Example #1
0
        public void Burn()
        {
            float fuelBurned = (float)(Frontiers.WorldClock.ARTDeltaTime * Globals.FireBurnFuelRate);

            if (FuelSource == null)
            {
                if (InternalFuel <= 0.0f)
                {
                    Extinguish();
                }
                else
                {
                    InternalFuel -= fuelBurned;
                }
            }
            else
            {
                //set this so we can use it in fixed update
                if (FuelSourceTransform == null)
                {
                    FuelSourceTransform = FuelSource.transform;
                }

                if (FuelSource.BurnFuel(fuelBurned) == false)
                {
                    Extinguish();
                }
            }
        }