コード例 #1
0
 protected override void OnStopWork(Worker worker)
 {
     operational.SetActive(false, false);
     if (worker != null)
     {
         if (jetSuitTank != null && !jetSuitTank.IsEmpty())
         {
             worker.RemoveTag(GameTags.JetSuitOutOfFuel);
         }
         if (leadSuitTank != null)
         {
             if (!leadSuitTank.IsEmpty())
             {
                 worker.RemoveTag(GameTags.SuitBatteryOut);
             }
             if (!leadSuitTank.NeedsRecharging())
             {
                 worker.RemoveTag(GameTags.SuitBatteryLow);
             }
         }
     }
     suitTank     = null;
     jetSuitTank  = null;
     leadSuitTank = null;
 }
コード例 #2
0
        protected override void OnStartWork(Worker worker)
        {
            SetWorkTime(float.PositiveInfinity);
            var suit = worker.GetComponent <MinionIdentity>().GetEquipment().GetAssignable(Db.Get().AssignableSlots.Suit);

            if (suit != null)
            {
                suitTank     = suit.GetComponent <SuitTank>();
                jetSuitTank  = suit.GetComponent <JetSuitTank>();
                leadSuitTank = suit.GetComponent <LeadSuitTank>();
            }
            operational.SetActive(true, false);
            elapsedTime = 0;
        }