public void trigger() { state.changeColor(Color.cyan); objectState oState = GetComponent <objectState> (); oState.parent.triggered = true; oState.triggered = true; }
private void Start() { oState = GetComponent <objectState> (); try { oState.changeColor(oState.child.changeColor()); } catch { print("couldn't set color for " + name); } }