Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
教程讲的太复杂了
.......可是我感觉就算我这里打出来怎么做,也不一定比教程简单.....嗯...摸摸头 ,耐心点看完 多试试就懂了
你想怎么关联?玩家属性可以写在数组里,比如"攻击力","最大生命值","当前生命值"什么的,你也可以写在实例变量里,怪物的属性的话就用实例变量,然后当怪物碰到子弹什么的就可以扣掉怪物的"当前生命值"具体扣多少,你可以写一个怪物的“当前生命值”减去玩家的"攻击力",如果敌人有防御力的话就可以经过一些公式后再扣掉敌人的血