public void initCSTA() { csta = new Messenger(); ICSTAEvent e = (ICSTAEvent)csta; e.OnEvent += E_OnEvent; ICSTAErrorEvent err = (ICSTAErrorEvent)csta; err.OnEvent += E_OnErrorEvent; myJid = null; csta.AddHandler(new Presence()); csta.AddHandler(new MessageHistory()); csta.AddHandler(new MessageAck()); csta.AddHandler(new SendMessage()); }
void Start() { Messenger.AddHandler(Message.GameOver, GameOver); Messenger.AddHandler(Message.AllTilesRevealed, (delegate { if (!IsGameOver) { GameCleared(); } })); Difficulty = PlayerPrefs.HasKey("Difficulty") ? PlayerPrefs.GetInt("Difficulty") : 0; Board.Instance.Populate(); LoadAd(); }
void Start() { Button.onClick.AddListener(() => Menu.SetActive(!Menu.activeSelf)); Messenger.AddHandler(Message.NewGame, () => Menu.SetActive(false)); VolumeSlider.onValueChanged.AddListener(MusicVolumeSliderChanged); SfxVolumeSlider.onValueChanged.AddListener(SfxVolumeSliderChanged); if (PlayerPrefs.HasKey("MusicVolume")) { VolumeSlider.value = PlayerPrefs.GetFloat("MusicVolume"); } if (PlayerPrefs.HasKey("SfxVolume")) { SfxVolumeSlider.value = PlayerPrefs.GetFloat("SfxVolume"); } Music.Play(); }
private void Start() { Player.LeveledUp += UpdateLevel; UpdateLevel(); Messenger.AddHandler(Message.NewGame, () => ValueLabel.text = "LV1"); }
public void TestLogin() { Task v = csta.Connect("631hc.connector73.net", "7778", ConnectType.Secure); v.Wait(); csta.AddHandler(new Presence()); csta.Login("ctestuser1", "nVsgvK").Wait(); Task.Delay(TimeSpan.FromSeconds(20)).Wait(); csta.Disconnect(); }