public static void ServerInitialize(Bullet obj, Ship owner, Vector2 position, float direction) { MovingGameObject.ServerInitialize(obj, position, Utils.Vector2Utils.ConstructVectorFromPolar(speed, direction) /*+ owner.Velocity*/, direction, 0, direction); obj.owner.Value = owner; obj.start.Value = position; }
public static void ServerInitialize(Ship ship, Vector2 position, Vector2 velocity, float direction, int health, float maxSpeed, float acceleration, float maxAgularSpeed, ControlState controller) { MovingGameObject.ServerInitialize(ship, position, new Vector2(0), direction, 0, 0); ship.health.Value = health; ship.maxSpeed.Value = maxSpeed; ship.acceleration.Value = acceleration; ship.maxAgularSpeed.Value = maxAgularSpeed; ship.controller = controller; }
public static void AddObject(MovingGameObject m) { movingGameObjectsToAdd.Add(m); }