예제 #1
0
 void RefreshCheats(object[] args)
 {
     foreach (CheatRow row in cheatGroup.GetComponentsInChildren <CheatRow>())
     {
         row.Setup(row.Key, CheatManager.GetCheatList()[row.Key]);
     }
 }
예제 #2
0
    void CreateCheatMenu()
    {
        foreach (KeyValuePair <string, object> row in CheatManager.GetCheatList())
        {
            GameObject cheatRow = Instantiate(sampleRow);
            cheatRow.GetComponent <CheatRow>().Setup(row.Key, row.Value);
            cheatRow.transform.parent     = cheatGroup.transform;
            cheatRow.transform.localScale = sampleRow.transform.localScale;
            cheatRow.SetActive(true);
        }

        Destroy(sampleRow);
    }