public void StartFlow(Spout originSpout = null) { if (isFlowing) { return; } isFlowing = true; foreach (Spout spout in spouts) { if (spout == originSpout) { continue; } spout.StartFlow(); } }
// Use this for initialization void Start() { spout = GameObject.FindGameObjectWithTag("Spout").GetComponent <Spout>(); player = GameObject.FindGameObjectWithTag("Player"); StartGame(); }