void Awake() { gameObject.AddComponent(typeof(VirusCanEnterOnScreen)); CanEnterOnScreen = GetComponent <ICanEnterOnScreen>(); gameObject.GetComponent <VirusCanMove>().EnterOnScreen = gameObject.GetComponent <IEnterOnScreen>(); gameObject.GetComponent <VirusPMove>().EnterOnScreen = gameObject.GetComponent <IEnterOnScreen>(); direction = Random.insideUnitCircle.normalized; timeShoot = 1f; HasEndedEnterOnScreen = false; }
void Awake() { CanEnterOnScreen = GetComponent <ICanEnterOnScreen>(); HasEndedEnterOnScreen = false; }