Esempio n. 1
0
        public override void Render(Canvas2D canvas, VisualPlayerUnit unit)
        {
            if (unit.PlayerUnit.State == PlayerUnit.PlayerState.Dead &&
                !unit.PlayerUnit.World.WorldState.GameComplete)
            {
                _unitExplosion.MoveTo(unit.PlayerUnit.Location * TileSize);
                _unitExplosion.Emit(BulletExplosionParticlesCount);

                ActivateShackeEffect(ShakeStrength, ShakeMinimizingSpeed);

                return;
            }
            if (unit.PlayerUnit.State != PlayerUnit.PlayerState.Dead)
            {
                Vector pos = unit.PlayerUnit.Location * TileSize;
                float directionAngle = unit.PlayerUnit.Direction.Angle;
                canvas.DrawSprite(pos, directionAngle, unit.MovementAnimation.ToSprite(), ColorU.White);
            }
        }
Esempio n. 2
0
 public virtual void Render(Canvas2D canvas, VisualPlayerUnit unit)
 {
 }