private void OnTriggerEnter(Collider other) { if (other.GetComponentInParent <twoshpere>() != null && !haveEnter) { ts = other.GetComponentInParent <twoshpere>(); haveEnter = true; change = true; } }
// Start is called before the first frame update void Start() { ts = GameObject.FindObjectOfType <twoshpere>(); halfCycle = ts.oneCycle * 0.5f; }