Exemple #1
0
        public object Clone()
        {
            SingleTargetFriendly Cannon = new SingleTargetFriendly(this.UID, this.CannonUID);

            Cannon.Target = this.Target;

            return(Cannon);
        }
Exemple #2
0
        public int Fire(CSimpleArtillary ActualTarget, SlimEnemy SlimEnemy, SingleTargetFriendly Cannon)
        {
            int IsEnemyDead = 0;

            if (SlimEnemy.Health > 0 && this.CheckFireConstraints(ActualTarget))
            {
                SlimEnemy.Health -= this.Damage;
                SlimEnemy.HittedBy.Add(Cannon.CannonUID);

                if (SlimEnemy.Health <= 0)
                {
                    IsEnemyDead = 1;
                }
            }

            return(IsEnemyDead);
        }