Ejemplo n.º 1
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;
        }
Ejemplo n.º 2
0
        public override object Clone()
        {
            BulletEntity entity = new BulletEntity(this.Tile);

            return entity;
        }