public static void Start(ILKitBehaviour ilkitBehaviour) { var ilBehaviour = new SettingUI { 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 SetIsAudioOn(bool isActive) { SettingUI.GetILComponent <SettingUI>().Mute.gameObject.SetActive(!isActive); }