void Start() { thingys = GameObject.Find("Controller").GetComponent <Thingys>(); pickUp = GetComponent <AudioSource>(); player = GameObject.FindGameObjectWithTag("Player"); achiev = GameObject.Find("Controller").GetComponent <GAchievs>(); }
void Awake() { hitParticles = GetComponent <ParticleSystem>(); anim = gameObject.GetComponent <Animator>(); enemyMovement = gameObject.GetComponent <EnemyMovement>(); currentHealth = startingHealth; achiev = GameObject.Find("Controller").GetComponent <GAchievs>(); }
void Awake() { player = GameObject.FindGameObjectWithTag("Player"); fader = GameObject.Find("Fader").GetComponent <ScreenFader>(); menuAnim = GameObject.Find("UIMenu").transform.GetChild(0).GetComponent <Animator>(); finalDoor = GameObject.Find("FinalDoor").GetComponent <FinalDoor>(); enemies = GameObject.Find("Enemies"); thingys = GetComponent <Thingys>(); achiev = GameObject.Find("Controller").GetComponent <GAchievs>(); if (!music) { GetComponent <AudioSource>().Stop(); } }
void Awake() { player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <PlayerHealth>(); chatBox = GameObject.Find("ChatBox").GetComponent <ChatBox>(); //if the npc is not a person if (!isStatic) { talkAnim = gameObject.GetComponent <Animator>(); talkSound = gameObject.GetComponent <AudioSource>(); } controlDialogs = GameObject.Find("Controller").GetComponent <ControlDialogs>(); dialogs = controlDialogs.dialogs; achiev = GameObject.Find("Controller").GetComponent <GAchievs>(); }