root/lang/hsp/misc/obaq_battletank/tank.as @ 34464

Revision 34464, 0.9 kB (checked in by eller, 4 years ago)

svn:mime-typeを試す

  • Property svn:mime-type set to text/plain;charset=SHIFT_JIS
Line 
1#module m_tank obaq_id
2#include "hspmath.as"
3#const double SPEED 0.4
4#modinit double scr_x, double scr_y, double angle
5        qcnvaxis@ obaq_x, obaq_y, scr_x, scr_y, 1
6        qaddpoly@ obaq_id, 5, obaq_x, obaq_y, angle, 10.0, 10.0, colsw_none@, MY_GROUP@, MY_GROUP@
7        return
8
9#modfunc accel_tank int direction, double rotation
10        qgetpos@ obaq_id, obaq_x, obaq_y, angle
11        speed_rot = rotation
12        speed_x = SPEED * cos(angle) * sgn(direction)
13        speed_y = SPEED * sin(angle) * sgn(direction)
14        qspeed@ obaq_id, speed_x, speed_y, rotation, 1
15        return
16
17#modfunc draw_tank
18        qgetpos@ obaq_id, obaq_x, obaq_y, angle
19        qcnvaxis@ scr_x, scr_y, obaq_x, obaq_y, 0
20        color 255, 255, 255
21        line scr_x, scr_y, scr_x + cos(angle) * 40, scr_y + sin(angle) * 40
22        return
23
24#modfunc shoot array bomb_list
25        qgetpos@ obaq_id, obaq_x, obaq_y, angle
26        newmod bomb_list, m_bomb, obaq_x, obaq_y, angle
27        return
28#global
Note: See TracBrowser for help on using the browser.