Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public static void AddObject(MovingGameObject m)
 {
     movingGameObjectsToAdd.Add(m);
 }