public virtual void Update(TimeSpan elapsed) { m_lifeTime -= elapsed.TotalSeconds; var newPos = m_location.Position + m_move.Direction * (float)elapsed.TotalSeconds * (float)m_move.Speed; m_location.SetPosition(newPos); }
public Shoot(Vector2 position, Vector2 direction, Color4ub startColor, Color4ub endColor, float angle = 2, float radius = 2) { m_location = new LocationComponent(this); m_location.SetPosition(position); m_cone = new Cone( position, radius, angle, startColor, endColor, (float)((Math.Atan2(direction.Y, direction.X) + Math.PI * 2) - (angle / 2.0) - Math.PI * 2) ); m_lifeTimeTotal = 0.2; m_lifeTime = m_lifeTimeTotal; }
public void SetPosition(Vector2 position) { m_location.SetPosition(position); }
public void SetPosition(Vector2 position) { m_location.SetPosition(position); m_box = new Vector2(64, 64); }
public void SetPosition(Vector2 position) { m_location.SetPosition(position); m_cone.Center = position; }
public virtual void SetPosition(Vector2 position) { m_location.SetPosition(position); m_box = new Vector2(32, 36); }