0

我在做游戏。在游戏中你杀死敌人。我在屏幕上设置了 20 个敌人。当您杀死其中一个时,屏幕顶部的栏必须显示剩下的 19 个敌人。然后18个敌人离开了。但它不起作用。你能帮助我吗?

这是我的代码:

if(this.visible==true){
            if(MovieClip(root).kalanDusmanSayisi>=0){
                MovieClip(root).oluDusmanSayisi-1
                this.visible=false
                MovieClip(root).elsilah.gotoAndStop(1)
                if(MovieClip(root).kalanDusmanSayisi==-1){
                MovieClip(root).kalanDusmanSayisi=0
                }
                MovieClip(root).kalanDusmanSayisi=MovieClip(root).toplamDusmanSayisi+MovieClip(root).oluDusmanSayisi-1
                MovieClip(root).rapor.text=MovieClip(root).kalanDusmanSayisi.toString()+ " kişi kaldı!"
            }else{
                removeEventListener(Event.ENTER_FRAME,dusmanZekasi)
                Mouse.show()
                var rpg:URLRequest=new URLRequest("3. Bölüm.swf")
                var rpgyukleyici:Loader=new Loader()
                rpgyukleyici.load(rpg)
                stage.addChild(rpgyukleyici)
                stage.removeChildAt(0)
            }
4

1 回答 1

0

第三行:MovieClip(root).oluDusmanSayisi=MovieClip(root).oluDusmanSayisi-1

于 2013-06-25T10:08:21.680 回答