Пример #1
0
    void Awake()
    {
        //player = GameObject.Find("Cthulhu").transform; //finds player transform reference
        santa = this;
        NotificationCenter.DefaultCenter().AddObserver(this, "QuitScene");
        NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnDead");
        NotificationCenter.DefaultCenter().AddObserver(this, "StopSpawner");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnLvlUp");

        playerJump2D = player.GetComponent <Jump2D>(); //finds Jump2D reference
    }
Пример #2
0
    void Awake()
    {
        //player = GameObject.Find("Cthulhu").transform; //finds player transform reference
        santa = this;
        NotificationCenter.DefaultCenter().AddObserver(this, "QuitScene");
        NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnDead");
        NotificationCenter.DefaultCenter().AddObserver(this, "StopSpawner");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnLvlUp");

        playerJump2D = player.GetComponent<Jump2D>(); //finds Jump2D reference
    }