Inheritance: MonoBehaviour
    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);
    }
Exemple #2
0
 private void Start()
 {
     sfx            = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManager>();
     pickUpItems    = GameObject.FindGameObjectWithTag("Player").GetComponent <PickUpItems>();
     this.inventory = GameManager.instance.inventory;
 }
Exemple #3
0
 void Awake()
 {
     instance = this;
 }
Exemple #4
0
 void Awake()
 {
     instance = this;
 }