예제 #1
0
    public void RefreshText()
    {
        if (configuration == null)
        {
            configuration = GameObject.FindWithTag("configuration").GetComponent <GameConfiguration>();
        }
        KeyCode keyCode = configuration.GetKeyCodePlayerAction(playerNameInSystem, actionNameInSystem) ?? KeyCode.None;

        keyText.text            = configuration.GetKeyCodeToString(keyCode);
        messageText.text        = "";
        changeKeyPanelText.text = string.Format("Saisissez une nouvelle touche \npour '{0}' du '{1}' :", actionNameText, playerNameText);
    }
예제 #2
0
    /// <summary>
    /// Configure les touches du personnage
    /// </summary>
    protected void KeyConfiguration()
    {
        GameConfiguration conf = GameObject.FindWithTag("configuration").GetComponent <GameConfiguration>();

        UpKey            = conf.GetKeyCodePlayerAction(gameObject.tag, "Up");
        DownKey          = conf.GetKeyCodePlayerAction(gameObject.tag, "Down");
        LeftKey          = conf.GetKeyCodePlayerAction(gameObject.tag, "Left");
        RightKey         = conf.GetKeyCodePlayerAction(gameObject.tag, "Right");
        baseAttackKey    = conf.GetKeyCodePlayerAction(gameObject.tag, "AttackBase");
        specialAttackKey = conf.GetKeyCodePlayerAction(gameObject.tag, "SpecialAttack");
        objetKey         = conf.GetKeyCodePlayerAction(gameObject.tag, "UseObject");
    }
예제 #3
0
    void Update()
    {
        KeyCode k = configuration.GetKeyCodePlayerAction(playerNameInSystem, actionNameInSystem) ?? KeyCode.None;

        keyText.text = configuration.GetKeyCodeToString(k);
    }