Tuesday, February 26, 2019

Unity 3d Pickup Money full script in C# language by allunityscripts

Pickup Money

unity 3d Pickup Money system full script in c sharp language


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PickupMoney : MonoBehaviour {

    Currency script;

    public int addAmount;

    void Start()
    {
        script = GameObject.FindWithTag("GameController").GetComponent<Currency>();
    }

    void OnTriggerEnter(Collider obj)
    {
        if (obj.gameObject.tag == "Player")
        {
            script.gold += addAmount;
            Destroy(gameObject);
        }   
    }
}

3 comments:

  1. Thank you for sharing such great information. can you help me in finding out more detail on CompTIA Certification Exams

    ReplyDelete
  2. What to Make Money From Online Casino - Work-to-Earn
    How do online casinos make money? — How do 메리트 카지노 online choegocasino casinos งานออนไลน์ make money? What to make money from online casino gambling? How do online casinos make money? How

    ReplyDelete