예제 #1
0
    /*
     * void FreezePower()
     * {
     * SoundManager.Instance.PlayFreeze();
     * GameObject go = Instantiate(freeze, transform);
     *
     * go.GetComponent<Explosion>().SetSizeMultiplier(explosionRange);
     * explosionRange -= explosionRangeDecrease;
     * if (explosionRange < 0) explosionRange = 0;
     * go.transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z);
     * }*/


    private void InputToColor(ActivateKeys key)
    {
        switch (key)
        {
        //A-button
        case ActivateKeys.X:
            InputText.color = Color.green;
            GetComponent <SpriteRenderer>().color = Color.green;
            break;

        //B-button
        case ActivateKeys.Circle:
            InputText.color = Color.red;
            GetComponent <SpriteRenderer>().color = Color.red;
            break;

        //X-Button
        case ActivateKeys.Square:
            InputText.color = Color.blue;
            GetComponent <SpriteRenderer>().color = Color.blue;
            break;

        //Y-button
        case ActivateKeys.Triangle:
            InputText.color = Color.yellow;
            GetComponent <SpriteRenderer>().color = Color.yellow;
            break;

        default:
            break;
        }
    }
예제 #2
0
    public string InputToString(ActivateKeys key)
    {
        string inputText = "";

        switch (key)
        {
        //A-button
        case ActivateKeys.X:
            //inputText = "S"; A
            inputText = "S";
            break;

        //B-button
        case ActivateKeys.Circle:
            //inputText = "D"; B
            inputText = "D";
            break;

        //X-Button
        case ActivateKeys.Square:
            //inputText = "A"; X
            inputText = "A";
            break;

        //Y-button
        case ActivateKeys.Triangle:
            //inputText = "w";
            inputText = "w";
            break;

        default:
            break;
        }
        return(inputText);
    }
예제 #3
0
 public void SetActivationKey(ActivateKeys key)
 {
     activationKey = key;
     InputToColor(key);
     InputToString(key);
 }