void Awake() { IsVisible = new DispatchOnSet <bool>(gameObject.GetInstanceID()); IsVisible.value = true; IsVisible.NotifyOnValueSet(ChangeVisibility); }
void Awake() { // Setting up the references. particle = GetComponentInChildren <ParticleSystem> (); play = new DispatchOnSet <bool>(this.gameObject.GetInstanceID()); play.NotifyOnValueSet(Play); }
void Awake() { // PieceType is set in Context NumPieces = new DispatchOnSet <int>(gameObject.GetInstanceID()); NumPieces.value = 0; NumPieces.NotifyOnValueSet(ChangeNumPieces); }
private void Awake() { isAlive = new DispatchOnSet <bool>(gameObject.GetInstanceID()) { value = true }; isAlive.NotifyOnValueSet(OnDeath); }