Esempio n. 1
0
 public void Load(ShipSerializer ss, Dock d)
 {
     destination        = d;
     destination_pos    = ss.destinationPos;
     docked             = ss.docked;
     transform.position = new Vector3(ss.xpos, ss.ypos, ss.zpos);
     transform.rotation = new Quaternion(ss.xrot, ss.yrot, ss.zrot, ss.wrot);
     speed       = ss.speed;
     unloaded    = ss.unloaded;
     xAxisMoving = ss.xAxisMoving;
     level       = ss.level;
     type        = ss.type;
 }
Esempio n. 2
0
 void LoadDockData(DockSerializer ds)
 {
     LoadWorkBuildingData(ds.workBuildingSerializer);
     correctLocation = ds.correctLocation;
     maintainingShip = ds.maintainingShip;
     if (maintainingShip)
     {
         ShipSerializer ss = ds.loadingShip;
         Ship           s  = PoolMaster.current.GetShip(ss.level, ss.type);
         s.Load(ss, this);
         loadingShip = s;
     }
     loadingTimer      = ds.loadingTimer;
     shipArrivingTimer = ds.shipArrivingTimer;
 }
Esempio n. 3
0
    public ShipSerializer GetShipSerializer()
    {
        ShipSerializer ss = new ShipSerializer();

        ss.destinationPos = destination_pos;
        ss.docked         = docked;
        ss.xpos           = transform.position.x; ss.ypos = transform.position.y; ss.zpos = transform.position.z;
        ss.xrot           = transform.rotation.x; ss.yrot = transform.rotation.y; ss.zrot = transform.rotation.z; ss.wrot = transform.rotation.w;
        ss.speed          = speed;
        ss.unloaded       = unloaded;
        ss.xAxisMoving    = xAxisMoving;
        ss.level          = level;
        ss.type           = type;
        return(ss);
    }