Пример #1
0
    void currentAction()
    {
        GameObject player = GameManager.player;
        string     role   = GameManager.playerrole;

        if (role == "survivor")
        {
            PlayerManager action = player.GetComponent <PlayerManager>();
            if (action.breakmirror)
            {
                _actionTextMeshProUGUI.text = "Break The Mirror!";
            }
            else if (action.upstairs)
            {
                _actionTextMeshProUGUI.text = "go upstairs";
            }
            else if (action.downstairs)
            {
                _actionTextMeshProUGUI.text = "go downstairs";
            }
            else
            {
                _actionTextMeshProUGUI.text = "no action";
            }
        }
        else if (role == "killer")
        {
            KillerManager action = player.GetComponent <KillerManager>();
            if (action.kill)
            {
                _actionTextMeshProUGUI.text = "Kill The Surviver!";
            }
            else if (action.entermirror)
            {
                _actionTextMeshProUGUI.text = "Enter Mirror";
            }
            else if (action.upstairs)
            {
                _actionTextMeshProUGUI.text = "go upstairs";
            }
            else if (action.downstairs)
            {
                _actionTextMeshProUGUI.text = "go downstairs";
            }
            else if (action.exitmirrorworld)
            {
                _actionTextMeshProUGUI.text = "Exit Mirror";
            }
            else
            {
                _actionTextMeshProUGUI.text = "no action";
            }
        }
    }
Пример #2
0
    void Action()
    {
        Debug.Log("action");
        GameObject player = GameManager.player;
        string     role   = GameManager.playerrole;

        if (role == "survivor")
        {
            PlayerManager action = player.GetComponent <PlayerManager>();
            action.SurviorAction();
        }
        else if (role == "killer")
        {
            KillerManager action = player.GetComponent <KillerManager>();
            action.KillerAction();
        }
    }