public void WebHookSpawn(string recievedaddress) { if (this.isLocalPlayer) { if (spawned == !true) { address = recievedaddress; Debug.Log("Connected:"); Debug.Log(recievedaddress); AddressOutput.text = address; playerspawn.Spawn(address); spawned = true; } } }
public void OnTriggerEnter2D(Collider2D collision) { if (collision.transform.tag == "Pickup") { invulnerable = true; gameObject.GetComponent <SpriteRenderer>().color = Color.black; coroutine = Wait(pickupTime); StartCoroutine(coroutine); character.speed = character.speed * 1.5f; Destroy(collision.gameObject); score.Increment(1); } else if (collision.transform.tag == "Point") { Destroy(collision.gameObject); score.Increment(0); } else if (collision.transform.tag == "Enemy") // enemy { if (invulnerable) { score.Increment(2); collision.transform.GetComponent <Character>().Kill(); } else { // here is death sequence for player, I'm removing one life and spawning next player before destroying this one lives.Die(); spawn.Spawn(); Destroy(gameObject); } } }
public void RpcGameStartSpawn() { if (this.isLocalPlayer) { // if (spawned == !true) // { if (address != "0x") //check if wallet is connected /came through webhookspawn>^ //enable in live environment. { playerspawn.Spawn(address); spawned = true; } //} } playerspawn.AfterQueOverFn(); }
public void FirstWave() { playerSpawn.Spawn(); NextWave(); }