예제 #1
0
 private void SetCanBeIgnited(bool canBeIgnited)
 {
     if (flammable.Data.CanBeIgnited != canBeIgnited)
     {
         var update = new Flammable.Update()
         {
             CanBeIgnited = canBeIgnited
         };
         flammable.SendUpdate(update);
     }
 }
예제 #2
0
        public override void Enter()
        {
            var update = new Flammable.Update()
            {
                CanBeIgnited = false
            };

            flammable.SendUpdate(update);

            flammable.OnUpdate += (OnFlammableUpdated);
            health.OnUpdate    += (OnHealthUpdated);
        }
예제 #3
0
        public override void Enter()
        {
            var update = new Flammable.Update()
            {
                CanBeIgnited = false
            };

            flammable.SendUpdate(update);

            if (regrowingCoroutine == null)
            {
                regrowingCoroutine = parentBehaviour.StartCoroutine(TimerUtils.WaitAndPerform(SimulationSettings.TreeStumpRegrowthTimeSecs, Regrow));
            }
        }
예제 #4
0
        public override void Enter()
        {
            // 进入这个状态的时候,要把树的血设置满
            var update = new Health.Update
            {
                CurrentHealth = SimulationSettings.TreeMaxHealth
            };

            health.SendUpdate(update);
            var update2 = new Flammable.Update
            {
                CanBeIgnited = true
            };

            flammable.SendUpdate(update2);

            flammable.OnUpdate += (OnFlammableUpdated);
            health.OnUpdate    += (OnHealthUpdated);
        }