#module \ Goatoh #defcfunc local \ New \ double p_initPosX,\ double p_initPosY,\ int p_initDirection posX.insNum = p_initPosX posY.insNum = p_initPosY scale.insNum = 2. ; 角度 arg.insNum = 0. ; 首の角度 neckArg.insNum = 0. walkVel.insNum = 3. walkAcl.insNum = 0. runVel.insNum = 5. runVel.insNum = 0. direction.insNum = p_initDirection walking.insNum = False running.insNum = False eating.insNum = False openingEyes.insNum = False openingMouth.insNum = False frame.insNum = 0 insNum++ Return insNum - 1 #deffunc local \ Walk \ int p_insId If direction.p_insId = DIRECTION_LEFT { posX.p_insId -= walkVel.p_insId * Cos (arg.p_insId) posY.p_insId -= walkVel.p_insId * Sin (arg.p_insId) } Else { posX.p_insId += walkVel.p_insId * Cos (arg.p_insId) posY.p_insId += walkVel.p_insId * Sin (arg.p_insId) } Return #deffunc local \ DoRun \ int p_insId Return #deffunc local \ Eat \ int p_insId Return #deffunc local \ Draw \ int p_insId Pos posX.p_insId - scale.p_insId * 50, posY.p_insId + scale.p_insId * 26 CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId Pos posX.p_insId + scale.p_insId * 30, posY.p_insId + scale.p_insId * 26 CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId Pos posX.p_insId + scale.p_insId * 64, posY.p_insId - scale.p_insId * 12 CelPut BUFFER_GOATOH_TAIL, 0, scale.p_insId, scale.p_insId Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_TARSO, 0, scale.p_insId, scale.p_insId Pos posX.p_insId - scale.p_insId * 30, posY.p_insId + scale.p_insId * 30 CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId Pos posX.p_insId + scale.p_insId * 50, posY.p_insId + scale.p_insId * 30 CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId Pos posX.p_insId - scale.p_insId * 64, posY.p_insId - scale.p_insId * 20 CelPut BUFFER_GOATOH_HEAD, 0, scale.p_insId, scale.p_insId, neckArg.p_insId Pos posX.p_insId - scale.p_insId * 64, posY.p_insId - scale.p_insId * 20 CelPut BUFFER_GOATOH_FACE_CC, 0, scale.p_insId, scale.p_insId, neckArg.p_insId Interval@Goatoh p_insId Return #deffunc local \ Interval \ int p_insId If walking.p_insId { Walk@Goatoh p_insId If frame.p_insId \ 150 == 30 { MMPlay SOUND_MUMUMUMU } } Else: If running.p_insId { DoRun@Goatoh p_insId } If eating.p_insId { Eat@Goatoh p_insId } frame.p_insId++ Return #global