Exemplo n.º 1
0
        private IEnumerator ReActivatePickableIn(int sec)
        {
            yield return(new WaitForSeconds(sec));

            isPicked = false;
            pickableCollider.enabled = !isPicked;
            animator.SetBool("isPicked", isPicked);
            CollectiblesManager.UpdateItemState(this);
            //Debug.Log($"Regenarted pickable{this.Id}");
        }
Exemplo n.º 2
0
 private void Awake()
 {
     if (string.IsNullOrEmpty(Id))
     {
         Id = "pickable" + this.gameObject.name;
         if (!CollectiblesManager.pickables.ContainsKey(this.Id))
         {
             CollectiblesManager.AddPickable(this, isPicked);
         }
     }
 }
Exemplo n.º 3
0
 public void setPicked(bool _isPicked)
 {
     isPicked = _isPicked;
     pickableCollider.enabled = !isPicked;
     CollectiblesManager.UpdateItemState(this);
 }