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()); }
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; }
/// <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); }
// 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; }
// 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>(); }
// 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>(); }
/// <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); }