void OnTriggerStay(Collider collider) { if (collider.gameObject.name == "Head" || collider.gameObject.name.StartsWith("Tail")) { cell.Activate(); isTriggered = true; triggerTime = Time.time; } }
public void InputDataUpdateFrequency(float frequency) { //using System.Linq; //int max = Cells.Count; for (int x = 0; x < Cells.Count; x++) { GameObject C = Cells.ElementAt <GameObject>(x); Cell myCell = C.GetComponent <Cell>(); myCell.Activate(frequency); } //Cell C = Cells[x].get<Cell>(); }
private void ActivateCellFrom(Queue <GameObject> queueCells) { while (queueCells.Count > 0) { Cell cell = null; var go = queueCells.Dequeue(); if (go != null) { if (go.TryGetComponent(out cell) == true) { cell.Activate(); } } } }