示例#1
0
        private void GameTicker_Tick(object sender, EventArgs e)
        {
            MyPlayer.Move();

            animation();
            Networking();
            collision();
            attackTimer++;

            foreach (var player in OtherPlayer.players.Values)
            {
                player.Move(MyPlayer.moveX, MyPlayer.moveY);
                if (player.isAttacking)
                {
                    MyPlayer.isAttacking = false;
                    Missle m = new Missle(player.perspectiveX, player.perspectiveY, player.worldX2, player.worldY2, MyPlayer.moveX, MyPlayer.moveY, player.username);
                    Missle.Missles.Add(m);
                }
            }
            foreach (var missle in Missle.Missles)
            {
                missle.move();
            }
            foreach (var m in Missle.MisslesToRemove)
            {
                Missle.Missles.Remove(m);
            }
            Missle.MisslesToRemove.Clear();

            Luncher.StartGame.Game.userControl.lvlLabel.Text       = "Level : " + (1 + (MyPlayer.experience / 100));
            Luncher.StartGame.Game.userControl.ExperienceBar.Value = MyPlayer.experience % 100;
            Luncher.StartGame.Game.userControl.Hitpoint.Value      = MyPlayer.hitpoint;
            this.Invalidate();
        }
示例#2
0
        public override void bulletCollided()
        {
            distanceCheck = ((tankPosition - this.position).Length());

            if (distanceCheck < 300)
            {
                missile = new Missle((TankGame)Game, new Vector2(tankPosition.X + missileOffset));
                Game.Components.Add(missile);
            }

            exploded = true;
        }
示例#3
0
        public override void bulletCollided()
        {
            distanceCheck = ((tankPosition - this.position).Length());

            if (distanceCheck < 300)
            {
                missile = new Missle((TankGame)Game, new Vector2(tankPosition.X + missileOffset));
                Game.Components.Add(missile);
            }

            exploded = true;
        }