Wednesday, May 1, 2019

Unity 3d Radiation Effect show full script by all unityscripts

Radiation Script

unity 3d Radiation script full

using UnityEngine;
using System.Collections;

public class Radiation : MonoBehaviour
{
    public GameObject radiationEffect;
    // Use this for initialization
    void Start()
    {

    }

    // Update is called once per frame
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            radiationEffect.SetActive(true);
        }
    }
    void OnTriggerExit(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            radiationEffect.SetActive(false);
        }
    }
}

No comments:

Post a Comment