Beispiel #1
0
    void CreateCheatButton(string title, CheatActionDelegate dele)
    {
        GameObject go     = Instantiate(cheatCell, cheatListTransform);
        CheatCell  script = go.GetComponent <CheatCell>();

        script.InitCell(title, dele);
    }
Beispiel #2
0
 public void InitCell(string desc, CheatActionDelegate actionDelegate)
 {
     description.text = desc;
     cheatButton.onClick.AddListener(delegate
     {
         actionDelegate();
     });
 }