Exemple #1
0
 private void OnAddResource(Improbable.Entity.Component.ResponseHandle <StockpileDepository.Commands.AddResource, AddResource, Improbable.Core.Nothing> request)
 {
     if (stockpileDepository.Data.canAcceptResources)
     {
         healthBehaviour.AddCurrentHealthDelta(request.Request.quantity);
     }
     request.Respond(new Nothing());
 }
        private IEnumerator TakeDamagefromFireCoroutine(float interval)
        {
            while (true)
            {
                yield return(new WaitForSeconds(interval));

                if (flammable.Data.isOnFire)
                {
                    healthBehaviour.AddCurrentHealthDelta(-SimulationSettings.FireDamagePerTick);
                }
            }
        }