コード例 #1
0
    private void OnMouseDown()
    {
        var buttons = FindObjectsOfType <DefenderButton>();

        foreach (DefenderButton button in buttons)
        {
            button.GetComponent <SpriteRenderer>().color = new Color32(125, 125, 125, 255);
        }

        sp.color = Color.white;
        defSpawn.UpdateDefender(defenderPrefab);
    }