OBY16
ちょこっと修正
ここまで来て修正しておいた方が良いかなという部分があるので
ちょこっとやっておくことにするです。
■メソッドを修正します。
● addMorphの順番を変えちゃう
口と鼻をサブモーフにする順番を替えまる。
鼻をaddMorphしてから口をaddMorphしてたのを口を先にaddMorphってかんじ。
なんでかって〜とこのままだと鼻を大きくした場合に鼻の上に口がのっかっちゃうから・・・。
--------------------------------------------
initialize
super initialize.
"土台の設定"
self extent: 80@80.
self color: (Color r: 1.0 g: 1.0 b: 1.0 alpha: 0.5).
self borderWidth: 0.
"顔の生成"
face _ ObyFace new.
self addMorph: face.
face align: face center with: self center.
"目の生成"
eyes _ ObyEyes new.
self addMorph: eyes.
eyes align: eyes center with: self center + (0 @ 0).
"口の生成"
lips _ ObyLips new.
self addMorph: lips.
lips align: lips center with: self center + (0 @ 23).
"鼻の生成"
nose _ ObyNose new.
self addMorph: nose.
nose align: nose center with: self center + (0 @ 5).
--------------------------------------------
アクセプト。
Alt + s ( Cmd + s )
● インスタンス変数名を変える
ObyFaceのインスタンス変数「face」を「faceSkin」に替えます。
なぜかっちゅ〜とObyのインスタンス変数「face」と区別したかったから・・・。
--------------------------------------------
Morph subclass: #ObyFace
instanceVariableNames: 'faceSkin '
classVariableNames: ''
poolDictionaries: ''
category: 'ObyMorph'
--------------------------------------------
アクセプト。
Alt + s ( Cmd + s )
もちろんこのインスタンス変数を使ってるObyFaceクラスのメソッドは
すべて「faceSkin」に入れ替えます。
● メソッド
ObyNoseのインスタンス変数「nose」を「noseSkin」に替えます。
Obyのインスタンス変数「nose」と区別したかったから・・・。
--------------------------------------------
Morph subclass: #ObyNose
instanceVariableNames: 'noseSkin gloss '
classVariableNames: ''
poolDictionaries: ''
category: 'ObyMorph'
--------------------------------------------
アクセプト。
Alt + s ( Cmd + s )
もちろんこのインスタンス変数を使ってるObyNoseクラスのメソッドは
すべて「noseSkin」に入れ替えます。
▲PREV ------ ● TOP ● ------ NEXT▼
■ MEMO ■
Tuesday, 13 April 2004, 11:35:32 pm
ちなみにここまでのソースコード。--thoru
ObyMorph.st
Links to this Page
- I BOBY last edited on 28 April 2004 at 8:57:55 pm by tk0005-202x210x196x109.ap-TK.usen.ad.jp
- OBY15 last edited on 17 June 2007 at 7:33:55 am by localhost.localdomain
- OBY17 last edited on 23 March 2011 at 6:38:48 am by 213-0-89-052.rad.tsai.es