// Use this for initialization void Start() { stepText = new List <string>(); _instance = this; if (bottles == null || bottles.Length == 0) { bottles = GameObject.FindObjectsOfType <Bottle>(); } if (hG == null) { hG = GameObject.FindObjectOfType <HydrogenGenerator>(); } if (hE == null) { hE = GameObject.FindObjectOfType <HydrogenEmitter>(); } bottleNum = 0; foreach (Bottle bottle in bottles) { bottle.SetState(Bottle.BottleState.EMPTY); } //splashText = File.ReadAllText("Assets/Resources/Text/splash.txt"); splashText = Resources.Load <TextAsset>("Text/splash").text; splashTextInitialized = true; for (int i = 1; i <= stepCount; i++) { string stpTxt = Resources.Load <TextAsset>("Text/step_" + i.ToString()).text; stepText.Add(stpTxt); } stepTextLoaded = true; }
public Exhaust() { HydrogenGenerator hydrogenGenerator = new HydrogenGenerator(100); HydrogenGenerator(100).activate(); }