示例#1
0
    void Start()
    {
        Application.runInBackground = true;
        gameOverCanvas.SetActive(false);
        //how to do stuffff


        BladeCast.BCListener listener = GetComponent <BladeCast.BCListener>();
        sender = GetComponent <BladeCast.BCSender>();

        //sender.SendToListeners("disabled", "playerId", "ten", 1);	//immune player


        listener.Add("connect", 0, "SpawnAPlayer");

        movementListener = new BCListener.Listener("movement", 0, "SaveJson");
        listener.Add(movementListener);
        //listener.Add("movement", 0, "Move");

        jumpingListener = new BCListener.Listener("jump", 0, "SaveJson");
        //listener.Add("jump", 0, "Jump");
        listener.Add(jumpingListener);

        StartCoroutine(SpawnPowerUpsForever());
    }
示例#2
0
 void Start()
 {
     Application.runInBackground = true;
     BladeCast.BCListener listener = GetComponent <BladeCast.BCListener>();
     sender = GetComponent <BladeCast.BCSender>();
     listener.Add("controls", 0, "applycontrols");
     //tankGraphics = tankGraphics.transform.FindChild("Tank");
     bulletPower = 0;
     basespeed   = bullet.GetComponent <FireBullet>().bulletspeeds;
 }
示例#3
0
        /// <summary>
        /// Removes the listener.
        /// </summary>
        /// <returns><c>true</c>, if listener was removed, <c>false</c> otherwise.</returns>
        /// <param name="listener">Listener.</param>
        public bool RemoveListener(BCListener bcListener)
        {
            bool doesContain = m_BCListeners.Contains(bcListener);

            if (doesContain)
            {
                m_BCListeners.Remove(bcListener);
                m_Dirty = true;
            }
            return(doesContain);
        }
示例#4
0
 // Use this for initialization
 void Start()
 {
     BladeCast.BCListener listener = GetComponent <BladeCast.BCListener>();
     sender = GetComponent <BladeCast.BCSender>();
     listener.Add("movement", 0, "Move");
     listener.Add("fire", 0, "Fire");
     listener.Add("spawn", 0, "Spawn");
     rb      = GetComponent <Rigidbody>();
     players = GameObject.FindGameObjectsWithTag("Player");
     health  = initialHealth;
 }
示例#5
0
	// Use this for initialization
	void Start () {
		//how to do stuffff
		listener = GetComponent<BladeCast.BCListener>();
        sender = GetComponent<BladeCast.BCSender>();
		movementListener = new BCListener.Listener ("movement", 0, "Move");
		listener.Add (movementListener);
		//listener.Add("movement", 0, "Move");

		jumpingListener = new BCListener.Listener ("jump", 0, "Jump");
		//listener.Add("jump", 0, "Jump");
		listener.Add(jumpingListener);

		attackingListener = new BCListener.Listener ("attack", 0, "Attack");
        //listener.Add("attack", 0, "Attack");
		listener.Add(attackingListener);

		rb = GetComponent<Rigidbody>();
        
	}
示例#6
0
    // Use this for initialization
    void Start()
    {
        //how to do stuffff
        listener         = GetComponent <BladeCast.BCListener>();
        sender           = GetComponent <BladeCast.BCSender>();
        movementListener = new BCListener.Listener("movement", 0, "Move");
        listener.Add(movementListener);
        //listener.Add("movement", 0, "Move");

        jumpingListener = new BCListener.Listener("jump", 0, "Jump");
        //listener.Add("jump", 0, "Jump");
        listener.Add(jumpingListener);

        attackingListener = new BCListener.Listener("attack", 0, "Attack");
        //listener.Add("attack", 0, "Attack");
        listener.Add(attackingListener);

        rb = GetComponent <Rigidbody>();
    }
示例#7
0
 /// <summary>
 /// Registers a listener.
 /// </summary>
 /// <param name="listener">Listener -- instance of a listener
 public BCListener RegisterListener(BCListener bcListener)
 {
     m_BCListeners.Add(bcListener);
     m_Dirty = true;
     return(bcListener);
 }