상속: MonoBehaviour
예제 #1
0
 public static death Instance()
 {
     if (instance == null)
     {
         instance = new death();
     }
     return(instance);
 }
예제 #2
0
    void OnTriggerStay(Collider collider)
    {
        string objectName = collider.gameObject.name;

        if (objectName == "Player")
        {
            death d = collider.gameObject.GetComponent <death>();
            d.isDeath = true;
        }
    }
예제 #3
0
    // Update is called once per frame
    void Update()
    {
        Bounds b = transform.renderer.bounds;
        Bounds p = player.renderer.bounds;

        if (b.Intersects(p))
        {
            death d = player.GetComponent <death>();
            d.isDeath = true;
        }
    }
예제 #4
0
    void Start()
    {
        gm  = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <GameScore>();
        lm  = FindObjectOfType <LoadMateri> ();
        ch  = GameObject.Find("character");
        rip = FindObjectOfType <death> ();
        cus = FindObjectOfType <flash> ();


        //thescoremanager = FindObjectOfType<scoremanager>();
    }
예제 #5
0
    void Awake()
    {
        // Making Sure there is a singleton of game maker
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }



        musicManager  = GameObject.Find("musicManagerGamePlay");
        gameplayMusic = musicManager.GetComponent <AudioSource>();
    }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     rip = FindObjectOfType <death> ();
 }