Exemplo n.º 1
0
    public void Kill()
    {
        GameObject temp = Instantiate <GameObject>((GameObject)Resources.Load("Prefabs/DeathEffect"));

        temp.transform.position = gameObject.transform.position;

        //DestroyObject (gameObject);
        //TODO fix where the player goes 29/01/2016 GlennCullen
        gameObject.transform.position = new Vector3(0, -20, 0);
        m_IsAlive = false;
        if (m_RespawnManager != null)
        {
            m_RespawnManager.StartRespawnTimer(gameObject);
        }
        else if (m_LobbySpawn != null)
        {
            m_LobbySpawn.StartRespawnTimer(gameObject);
        }
    }