public static void Start(ILKitBehaviour ilkitBehaviour) { var ilBehaviour = new RankUI { transform = ilkitBehaviour.transform, gameObject = ilkitBehaviour.gameObject, MonoBehaviour = ilkitBehaviour }; ilkitBehaviour.Script = ilBehaviour; ilBehaviour.SetupBinds(); ilBehaviour.OnStart(); ilkitBehaviour.OnDestroyAction += ilBehaviour.DestroyScript; }
protected override void OnOpen(ILUIData uiData = null) { mData = uiData as UITetrisPanelData ?? new UITetrisPanelData(); Model = new GameModel(); RankUI.GetComponent <Button>().onClick.AddListener(OnRankUIClick); SettingUI.GetComponent <Button>().onClick.AddListener(OnSettingUIClick); SetIsAudioOn(AudioKit.Settings.IsOn.Value); AudioKit.Settings.IsOn.Bind(SetIsAudioOn); gameManager = new GameManager(transform); SendCommand(new EnteringMenuCommand()); }
public void ShowRankUI(int score, int highScore, int numbersGame) { RankUI.Show() .GetILComponent <RankUI>() .WithData(score, highScore, numbersGame); }