Esempio n. 1
0
    private void Beh_StateExited(object sender, StateEventBehaviour.StateEvent e)
    {
        if (e.Info.fullPathHash == stateSpinning)
        {
            cont.AddLock(this);

            positionStart = transform.position;
            timeStart     = Time.time;
            //var particles =	GetComponentInChildren<ParticleSystem>();
            parts.emissionRate = 0;
        }
        if (e.Info.fullPathHash == stateStopped)
        {
            //parts.emissionRate = 100;
        }
        if (e.Info.fullPathHash == statePutaway)
        {
            parts.emissionRate = 0;
            cont.RemoveLock(this);
            nbscript.SetBool("ForceOpen", false);
            foreach (var card in LinkedCards)
            {
                card.SetActive(true);
            }
            this.gameObject.SetActive(false);
//            DestroyObject(this.gameObject);
        }
    }
Esempio n. 2
0
 private void Beh_StateEntered(object sender, StateEventBehaviour.StateEvent e)
 {
     for (int i = 0; i < hashStates.Length; i++)
     {
         if (hashStates[i] == e.Info.fullPathHash)
         {
             audioSource.PlayOneShot(Triggers[i].Clip);
         }
     }
 }
Esempio n. 3
0
    private void Beh_StateEntered(object sender, StateEventBehaviour.StateEvent e)
    {
        if (e.Info.fullPathHash == stateStopped)
        {
            nbscript.SetBool("ForceClosed", true);
        }
        if (e.Info.fullPathHash == statePutaway)
        {
            parts.emissionRate = 100;
            nbscript.SetBool("ForceClosed", false);
            nbscript.SetBool("ForceOpen", true);
            nbscript.CurrentPage = PageNumber;

            targetScript.ImageFound();
        }
    }