示例#1
0
    /// <summary>
    /// When player enter, initialize the level and spawn ennemies
    /// </summary>
    public void PlayerEnter()
    {
        // Indicate teleporter manager that the player is here
        TeleporterManager tpm = teleportersExit.GetComponent <TeleporterManager>();

        tpm.SetPlayerHere(true);
        tpm.SetLevelComplete(IsSublevelComplete, levelIndex);

        if (OnPlayerEnter == null)
        {
            tpm.EnableTeleporters();
        }
        else
        {
            OnPlayerEnter?.Invoke(this, EventArgs.Empty);
        }
    }