Exemple #1
0
 void Awake()
 {
     Initialize(MaterialTypes.Wood);
     _flammable     = gameObject.AddComponent <Flammable>();
     _flammableType = Resources.Load <FlammableTypeSO>("FlammableWood");
     _flammable.Initialize(this, _flammableType);
 }
Exemple #2
0
    public void Initialize(GameMaterial owner, FlammableTypeSO flammableType)
    {
        _flammableType = flammableType;
        Owner          = owner;
        IOElements     = new float[5];
        _airMedium     = GameObject.Find("MediumAir").GetComponent <Medium>();

        for (int i = 0; i < 5; i++)
        {
            IOElements[i] = _flammableType.IO[i].ValuePerTick;
        }
    }