#module \ Goatoh #defcfunc local \ New \ double p_initPosX,\ double p_initPosY,\ int p_initDirection posX.insNum = p_initPosX posY.insNum = p_initPosY ; 角度 arg.insNum = 0. ; 首の角度 neckArg.insNum = 0. walkVel.insNum = 3. walkAcl.insNum = 0. runVel.insNum = 5. runVel.insNum = 0. direction.insNum = p_initDirection walking.insNum = True 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, posY.p_insId CelPut BUFFER_GOATOH_TAIL Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_TARSO Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_FACE_CC, 0, 1., 1., neckArg.p_insId Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_HEAD, 0, 1., 1., neckArg.p_insId Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_LEG Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_LEG Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_LEG Pos posX.p_insId, posY.p_insId CelPut BUFFER_GOATOH_LEG Interval@Goatoh p_insId Return #deffunc local \ Interval \ int p_insId If walking.p_insId { Walk@Goatoh p_insId } Else: If running.p_insId { DoRun@Goatoh p_insId } If eating.p_insId { Eat@Goatoh p_insId } frame.p_insId++ Return #global