すくすくゴートうちゃん 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.

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