void Awake () { dpm = GameObject.Find("Field Objects").GetComponent<DoppleManager>(); main = transform.Find("Main"); waves = transform.Find("Waves"); wavesObj = new GameObject[waves.childCount]; int count = 0; foreach (Transform tr in waves) { wavesObj[count++] = tr.gameObject; } duration = dpm.waveAwakeDuration; originalMainScale = main.transform.localScale.x; enlargeMainUntil = wavesObj[waves.childCount - 1].transform.localScale.x /2f * originalMainScale; enlargeDiff = enlargeMainUntil - originalMainScale; }
override protected void initializeRest() { dpm = (DoppleManager) objectsManager; radius = dpm.blinkRadius; teleportingSound = GetComponent<AudioSource>(); }
void Start () { dpm = GameObject.Find("Field Objects").GetComponent<DoppleManager>(); }