Inheritance: MonoBehaviour
Exemplo n.º 1
0
    private bool IsTargetCollider(Collider target)
    {
        bool       isTarget  = false;
        GameObject targetObj = target.gameObject;

        if (targetObj.name.Equals("PickUpSystem", StringComparison.OrdinalIgnoreCase))
        {
            if (targetObj.TryGetComponent(out PickUpItems cartPickUp))
            {
                cartPickUpSystem = cartPickUp;
                isTarget         = true;
            }
        }
        return(isTarget);
    }
Exemplo n.º 2
0
 private void Start()
 {
     sfx            = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManager>();
     pickUpItems    = GameObject.FindGameObjectWithTag("Player").GetComponent <PickUpItems>();
     this.inventory = GameManager.instance.inventory;
 }
Exemplo n.º 3
0
 void Awake()
 {
     instance = this;
 }
Exemplo n.º 4
0
 void Awake()
 {
     instance = this;
 }