すくすくゴートうちゃん Android 版(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
1.7 KiB

  1. #module \
  2. Goatoh
  3. #defcfunc local \
  4. New \
  5. double p_initPosX,\
  6. double p_initPosY,\
  7. int p_initDirection
  8. posX.insNum = p_initPosX
  9. posY.insNum = p_initPosY
  10. ; 角度
  11. arg.insNum = 0.
  12. ; 首の角度
  13. neckArg.insNum = 0.
  14. walkVel.insNum = 3.
  15. walkAcl.insNum = 0.
  16. runVel.insNum = 5.
  17. runVel.insNum = 0.
  18. direction.insNum = p_initDirection
  19. walking.insNum = True
  20. running.insNum = False
  21. eating.insNum = False
  22. openingEyes.insNum = False
  23. openingMouth.insNum = False
  24. frame.insNum = 0
  25. insNum++
  26. Return insNum - 1
  27. #deffunc local \
  28. Walk \
  29. int p_insId
  30. If direction.p_insId = DIRECTION_LEFT {
  31. posX.p_insId -= walkVel.p_insId * Cos (arg.p_insId)
  32. posY.p_insId -= walkVel.p_insId * Sin (arg.p_insId)
  33. }
  34. Else {
  35. posX.p_insId += walkVel.p_insId * Cos (arg.p_insId)
  36. posY.p_insId += walkVel.p_insId * Sin (arg.p_insId)
  37. }
  38. Return
  39. #deffunc local \
  40. DoRun \
  41. int p_insId
  42. Return
  43. #deffunc local \
  44. Eat \
  45. int p_insId
  46. Return
  47. #deffunc local \
  48. Draw \
  49. int p_insId
  50. Pos posX.p_insId, posY.p_insId
  51. CelPut BUFFER_GOATOH_TAIL
  52. Pos posX.p_insId, posY.p_insId
  53. CelPut BUFFER_GOATOH_TARSO
  54. Pos posX.p_insId, posY.p_insId
  55. CelPut BUFFER_GOATOH_FACE_CC, 0, 1., 1., neckArg.p_insId
  56. Pos posX.p_insId, posY.p_insId
  57. CelPut BUFFER_GOATOH_HEAD, 0, 1., 1., neckArg.p_insId
  58. Pos posX.p_insId, posY.p_insId
  59. CelPut BUFFER_GOATOH_LEG
  60. Pos posX.p_insId, posY.p_insId
  61. CelPut BUFFER_GOATOH_LEG
  62. Pos posX.p_insId, posY.p_insId
  63. CelPut BUFFER_GOATOH_LEG
  64. Pos posX.p_insId, posY.p_insId
  65. CelPut BUFFER_GOATOH_LEG
  66. Interval@Goatoh p_insId
  67. Return
  68. #deffunc local \
  69. Interval \
  70. int p_insId
  71. If walking.p_insId {
  72. Walk@Goatoh p_insId
  73. }
  74. Else: If running.p_insId {
  75. DoRun@Goatoh p_insId
  76. }
  77. If eating.p_insId {
  78. Eat@Goatoh p_insId
  79. }
  80. frame.p_insId++
  81. Return
  82. #global