Beispiel #1
0
 public void RegisterHandler(string node, PubsubHandler handler)
 {
     // FIXME: What's the purpose of this maxItems arg?
     m_Account.PubSubManager.AddNodeHandler(node, delegate(PubSubNode n, PubSubItem item) {
         handler(n.Jid, n.Node, item);
     }, null, 1000);
 }
 void OnEnable()
 {
     OnNewInteractiveBloc = PubsubHandler.HandleNewInteractiveBloc((GameObject bloc) =>
     {
         print("MyEventSystem::HandleNewInteractiveBloc -- Save new bloc " + bloc);
         this.bloc = bloc.GetComponent <InteractiveBloc>();
     });
 }
Beispiel #3
0
    void OnEnable()
    {
        OnGameOver = PubsubHandler.HandleGameOver((ignore) =>
        {
            Destroy(gameObject);
        });

        OnBlocTouchTower = PubsubHandler.HandleBlocTouchTower((bloc) =>
        {
            AddBloc(bloc);
            StartCoroutine(BounceOff(this.speed));
        });
    }
Beispiel #4
0
    void OnEnable()
    {
        OnNewBlocOnTower = PubsubHandler.HandleNewBlocOnTower((int count, GameObject _bloc) =>
        {
            score           = count;
            scoreLabel.text = score.ToString();

            if (score > 1)
            {
                StartCoroutine(BumpText());

                if (score % 10 == 0)
                {
                    maxSize += 0.1f;
                }
            }
        });
    }
Beispiel #5
0
    void OnEnable()
    {
        OnNewBlocOnTower = PubsubHandler.HandleNewBlocOnTower((int count, GameObject bloc) =>
        {
            blocCount = count;
            transform.Translate(Vector3.down * step);

            if (blocCount % 10 == 0)
            {
                GameObject movingBackground = Instantiate(movingBackgroundPrefab);

                movingBackground.transform.position = new Vector3(
                    transform.position.x,
                    5,
                    transform.position.z
                    );
            }
        });
    }
Beispiel #6
0
 public void RegisterHandler(string node, PubsubHandler handler)
 {
     // FIXME: What's the purpose of this maxItems arg?
     m_Account.PubSubManager.AddNodeHandler(node, delegate (PubSubNode n, PubSubItem item) {
         handler(n.Jid, n.Node, item);
     }, null, 1000);
 }