//ActivateCannon active; // Use this for initialization void Start() { shooting = GetComponent <Shooting> (); movement = GetComponent <Movement> (); collectSnow = GetComponent <CollectSnow> (); collectFort = GetComponent <CollectSnowFort> (); aiming = GetComponent <Aiming> (); rb = GetComponent <Rigidbody>(); heal = GetComponent <HealSnowmanProximity>(); //active = GetComponent<ActivateCannon> (); }
void OnTriggerExit(Collider other2) { GameObject other = getParent(other2.gameObject); CollectSnowFort collecter = other.GetComponent <CollectSnowFort> (); if (collecter != null) { int otherPlayerNum = other.GetComponent <Movement> ().player_num; if (otherPlayerNum == playerNum || otherPlayerNum == playerNum - 1) { collecter.touchingSnowPile = false; collecter.snowfort = null; collecter.oldFort = null; } } }
void handleTriggerStays(Collider other2) { GameObject other = getParent(other2.gameObject); CollectSnowFort collecter = other.GetComponent <CollectSnowFort> (); if (collecter != null) { int otherPlayerNum = other.GetComponent <Movement> ().player_num; if (otherPlayerNum == playerNum || otherPlayerNum == playerNum - 1) { collecter.touchingSnowPile = true; collecter.snowfort = this; collecter.oldFort = this.gameObject; collecter.isSnowCannon = isCannon; } } }