Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 void OnEnable()
 {
     OnNewInteractiveBloc = PubsubHandler.HandleNewInteractiveBloc((GameObject bloc) =>
     {
         print("MyEventSystem::HandleNewInteractiveBloc -- Save new bloc " + bloc);
         this.bloc = bloc.GetComponent <InteractiveBloc>();
     });
 }
Ejemplo n.º 3
0
    void OnEnable()
    {
        OnGameOver = PubsubHandler.HandleGameOver((ignore) =>
        {
            Destroy(gameObject);
        });

        OnBlocTouchTower = PubsubHandler.HandleBlocTouchTower((bloc) =>
        {
            AddBloc(bloc);
            StartCoroutine(BounceOff(this.speed));
        });
    }
Ejemplo n.º 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;
                }
            }
        });
    }
Ejemplo n.º 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
                    );
            }
        });
    }
Ejemplo n.º 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);
 }