Exemplo n.º 1
0
 public Cruiser() : base(8, 6, 6, 6, 2)
 {
     Type         = UnitType.Cruiser;
     Name         = "Cruiser";
     RequiredTech = new Combustion();
     ObsoleteTech = null;
     SetIcon('C', 0, 1);
 }
Exemplo n.º 2
0
 public Ironclad() : base(6, 4, 4, 4)
 {
     Type         = UnitType.Ironclad;
     Name         = "Ironclad";
     RequiredTech = new SteamEngine();
     ObsoleteTech = new Combustion();
     SetIcon('A', 0, 1);
 }
Exemplo n.º 3
0
 // Spread coroutine which is responsible for fire activity on certain Combustible component.
 // This coroutine is running when Combustion is equals to Burning state and while loop within this function is looping each tick based on WeatherControl windIntervalTick variable.
 private IEnumerator Burn()
 {
     while (combustion == Combustion.Burning)
     {
         if (combustibility <= 0)
         {
             combustion = Combustion.Burned;
         }
         combustibility -= 1;
         yield return(new WaitForSeconds(weatherControl.GetWindIntervalTick()));
     }
     ChangeColor();
 }
Exemplo n.º 4
0
 // Extinguish function stops coroutine for Spreading and set back Combustion to None and color to green, but keeps the combustibility value so it's already "damaged".
 public void Extinguish()
 {
     StopCoroutine(coroutine);
     combustion = Combustion.None;
     ChangeColor();
 }
Exemplo n.º 5
0
 // Ignition function
 public void Ignite()
 {
     combustion = Combustion.Burning;
     ChangeColor();
     StartCoroutine(coroutine);
 }