Ejemplo n.º 1
0
        public override void Render(Canvas2D canvas, VisualBulletUnit unit)
        {
            if (unit.BulletUnit.BulletState ==
                BattleCore.Units.BulletUnit.BulletUnitState.Dead)
            {
                var possiblePlayerUnit = unit.BulletUnit.DeadOn as PlayerUnit;
                if (possiblePlayerUnit != null)
                {
                    ActivateShackeEffect(ShakeStrength, ShakeMinimizingSpeed);
                }

                _bulletExplosion.MoveTo(unit.BulletUnit.Location * TileSize);
                _bulletExplosion.Emit(BulletExplosionParticlesCount);
            }
            else
            {
                Vector pos = unit.BulletUnit.Location * TileSize;
                float directionAngle = unit.BulletUnit.Direction.Angle;
                canvas.DrawSprite(pos, directionAngle, unit.FlightAnimation.ToSprite(), ColorU.White);
            }
        }
Ejemplo n.º 2
0
 public virtual void Render(Canvas2D canvas, VisualBulletUnit unit)
 {
 }