コード例 #1
0
        void Awake()
        {
            IsVisible       = new DispatchOnSet <bool>(gameObject.GetInstanceID());
            IsVisible.value = true;

            IsVisible.NotifyOnValueSet(ChangeVisibility);
        }
コード例 #2
0
 void Awake()
 {
     // Setting up the references.
     particle = GetComponentInChildren <ParticleSystem> ();
     play     = new DispatchOnSet <bool>(this.gameObject.GetInstanceID());
     play.NotifyOnValueSet(Play);
 }
コード例 #3
0
        void Awake()
        {
            // PieceType is set in Context
            NumPieces       = new DispatchOnSet <int>(gameObject.GetInstanceID());
            NumPieces.value = 0;

            NumPieces.NotifyOnValueSet(ChangeNumPieces);
        }
コード例 #4
0
 private void Awake()
 {
     isAlive = new DispatchOnSet <bool>(gameObject.GetInstanceID())
     {
         value = true
     };
     isAlive.NotifyOnValueSet(OnDeath);
 }