public static void ServerInitialize(MemberPhysicalObject obj, PhysicalObject parent, Vector2 positionRelativeToParent, float directionRelativeToParent)
 {
     obj.positionRelativeToParent.Value = positionRelativeToParent;
     obj.directionRelativeToParent.Value = directionRelativeToParent;
     obj.parent.Value = parent;
     parent.Add(obj);
 }
Exemplo n.º 2
0
 public static void ServerInitialize(Gun obj, PhysicalObject parent, Vector2 position, float direction)
 {
     MemberPhysicalObject.ServerInitialize(obj, parent, position, direction);
 }
Exemplo n.º 3
0
        public static void ServerInitialize(Turret obj, PhysicalObject parent, Vector2 position, float direction, float range, ControlState controller)
        {
            MemberPhysicalObject.ServerInitialize(obj, parent, position, direction);
            obj.Range = range;

            obj.controller = controller;

            Gun gun = new Gun(obj.Game);
            Gun.ServerInitialize(gun, obj, new Vector2(37, 0), 0);
            obj.Game.GameObjectCollection.Add(gun);
        }