public void SetDockInfo(RepairDockInfo dock)
 {
     this.dockInfo = dock;
     this.isFinished = this.dockInfo.IsFinished;
     this.UpdateDockInfo();
     this.UpdateShipInfo();
 }
 private GameObject GetPrefabOfDock(RepairDockInfo dock)
 {
     if (dock.locked > 0)
     {
         return this.lockedDockPrefab;
     }
     if (dock.startTime == 0)
     {
         return this.notUsingdockPrefab;
     }
     if (dock.IsFinished)
     {
         return this.finishedDockPrefab;
     }
     return this.inUsingDockPrefab;
 }
예제 #3
0
 public void SetRepairDocks(RepairDockInfo[] docks)
 {
     this._userRepairDocks = docks;
     this._userRepairDic = new Dictionary<int, RepairDockInfo>();
     foreach (RepairDockInfo info in docks)
     {
         if (info.shipId > 0)
         {
             this._userRepairDic[info.shipId] = info;
         }
     }
 }
 private void TryFinishDock(RepairDockInfo dock)
 {
     RepairRequest request = ServerRequestManager.instance.FinishRepair(dock.shipId, dock.id);
     request.GetShipSuccess += new EventHandler<EventArgs>(this.HandleGetShipSuccess);
     request.GetShipFail += new EventHandler<EventArgs>(this.HandleGetShipFail);
 }
 public void GetShipAtDock(RepairDockInfo toFinishDock)
 {
     if (GlobalLock.instance.CanGo)
     {
         GlobalLock.instance.GoNow();
     }
     else
     {
         return;
     }
     this.ReqGetFinishedShip(toFinishDock.shipId, toFinishDock.id);
 }