void Awake() { fc = GetComponent <FirefighterController>(); ac = GetComponent <ArsonistController>(); animator = GetComponentInChildren <Animator>(); rb2d = GetComponent <Rigidbody2D>(); }
void OnTriggerEnter2D(Collider2D c) { ArsonistController ac = c.gameObject.GetComponent <ArsonistController>(); if (ac && ac.enabled) { ac.Kill(); } if (c.CompareTag("Room") || c.CompareTag("Match") || (ac && !ac.enabled)) { return; } NetworkServer.Destroy(gameObject); }