예제 #1
0
        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());
        }
예제 #2
0
    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();
    }
예제 #3
0
    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();
    }
예제 #4
0
 private void Start()
 {
     Player.LeveledUp += UpdateLevel;
     UpdateLevel();
     Messenger.AddHandler(Message.NewGame, () => ValueLabel.text = "LV1");
 }
예제 #5
0
        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();
        }