![]() |
|
A new design pattern |
keprast
Member #16,794
January 2018
|
I use this model to distinguish between different players. C + + entry, obviously can not tell me.I need a living enthusiastic person. if (player_bullet_num_max[player_id] == 35) { bulxyl_01[gun_id[player_id]][player_id][(Bullet_box_num[gun_id[player_id]][player_id] - 1)].bullet_hp = 100; bulxyl_01[gun_id[player_id]][player_id][(Bullet_box_num[gun_id[player_id]][player_id] - 1)].bullet_x = /*gun x*/; bulxyl_01[gun_id[player_id]][player_id][(Bullet_box_num[gun_id[player_id]][player_id] - 1)].bullet_y = /*gun y*/; bulxyl_01[gun_id[player_id]][player_id][(Bullet_box_num[gun_id[player_id]][player_id] - 1)].bullet_arc = /*gun arc*/; }
|
Neil Roy
Member #2,229
April 2002
![]() |
For shooting bullets, I would create a list of bullets and everytime you shoot, add that bullet to the list. The list could contain all the information you need about each bullet if need be. I am a C programmer, and have my own vector style implementation for C. For C++ you could use vector's to easily add new bullets to a list. --- |
keprast
Member #16,794
January 2018
|
@Neil Roy Luckily, we have a common idea. |
|