コード例 #1
0
    //void Start() => UpdateFusionCount();

    void Update()
    {
        for (int i = 0; i < gameOptions.Count; i++)
        {
            GameOption go = gameOptions[i];
            if (Input.GetKeyDown(go.keyCode))
            {
                go.OnComplete();
                if (go.destroyOnUse)
                {
                    gameOptions.Remove(go);
                    Destroy(go.gameObject);
                    UpdateGameOptions();
                    i--;
                }
            }
        }

        if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            GameManager.instance.gameLevel.blocks.SelectPrevBlock();
        }
        if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            GameManager.instance.gameLevel.blocks.SelectNextBlock();
        }
    }