int staleCombo; //counter that goes up whenever a stale move connects void OnTriggerEnter(Collider other) { if (other.transform.CompareTag("Respawn")) //ignore collisions with spawner that doesn't belong to player { spPlatform sp = other.GetComponent <spPlatform>(); if (sp.spCharacter != transform.root) { Physics.IgnoreCollision(transform.collider, other.transform.collider); } } if (other.transform.CompareTag("Ceiling") && ktimer > 0) //if launched while inside ceiling, destroy and spawn backfall { GameObject.Destroy(gameObject); Transform controller = GameObject.FindGameObjectWithTag("GameController").transform; if (controller != null) { controller.SendMessage("BackfallTitus", pnum, SendMessageOptions.DontRequireReceiver); } } else if (other.transform.CompareTag("BlastWall")) //if hitting blastwall, destroy { Transform controller = GameObject.FindGameObjectWithTag("GameController").transform; if (controller != null) { controller.SendMessage("KOed", pnum, SendMessageOptions.DontRequireReceiver); } } }
//set spawning data void isSpawning(Transform platform) { spPlatform sp = platform.GetComponent <spPlatform>(); spawning = true; if (sp.moveTimer == 0) { spawnMobile = true; } else { spawnMobile = false; } splat = platform; }