Example #1
0
        public int Attack(IDefendable defender)
        {
            if (defender.IsNotNull())
            {
                BeamEntity beam = new BeamEntity
                (
                    this.Tile,
                    this.Texture_Beam,
                    this.Color,
                    false,
                    this.layerDepth + 0.02f,
                    this.Damage,
                    this,
                    defender,
                    this.Angle
                );

                this.ChildrenEntities.Add(beam);
            }

            return 0;
        }
Example #2
0
        public int Attack(IDefendable defender)
        {
            if (defender.IsNotNull())
            {
                this.Angle = FindAngle(defender);
                //this.Rotation = this.Angle.ToRotation();
                this.Rotation = 0;

                BulletEntity bullet = new BulletEntity
                (
                    this.Tile,
                    this.Texture_Bullet,
                    this.Color,
                    false,
                    this.layerDepth + 0.01f,
                    this.Damage,
                    this,
                    this.Angle * 5
                    //Vector2.SmoothStep(this.Position, defender.Position, 0.01f)
                );

                this.ChildrenEntities.Add(bullet);
            }

            return 0;
        }
Example #3
0
        public int Attack(IDefendable defender)
        {
            if (defender.IsNotNull())
            {
                LavaEntity lava = new LavaEntity
                (
                    this.Tile,
                    this.Texture_Lava,
                    this.Color,
                    false,
                    this.layerDepth + 0.02f,
                    this.Damage,
                    this,
                    defender,
                    this.Angle
                );

                this.ChildrenEntities.Add(lava);
            }

            return 0;
        }