Ejemplo n.º 1
0
 public serializationData(int idleTimer, int idleDeliveryTimer, State curState, ressourceStack delivery, GameObject target, GameObject lastTarget, GameObject deliverTarget, GameObject deliverFrom)
 {
     this.idleTimer         = idleTimer;
     this.idleDeliveryTimer = idleDeliveryTimer;
     this.curState          = curState;
     if (curState == State.RouteDelivering)
     {
         this.curState = State.Idle;
     }
     this.delivery = delivery;
     if (target != null)
     {
         this.target = target.transform.position;
     }
     else
     {
         this.target = Vector3.zero;
     }
     if (lastTarget != null)
     {
         this.lastTarget = lastTarget.transform.position;
     }
     else
     {
         this.lastTarget = Vector3.zero;
     }
     if (deliverTarget != null)
     {
         this.deliverTarget = deliverTarget.transform.position;
     }
     else
     {
         this.deliverTarget = Vector3.zero;
     }
     if (deliverFrom != null)
     {
         this.deliverFrom = deliverFrom.transform.position;
     }
     else
     {
         this.deliverFrom = Vector3.zero;
     }
 }