//public ItemRegistry registeritem; public void Awake() { itemok = false; ranker = GameObject.Find("Avatar").GetComponent <MilestoneRankManager>(); storychecker = GameObject.Find("Avatar").GetComponent <StoryChecker>(); Pickuptext = GameObject.Find("Item Pickup").GetComponent <Text>(); dagear = GameObject.Find("Avatar").GetComponent <Itemslots>(); itemchecker = GameObject.Find("Avatar").GetComponent <AchievementHunter>(); sfxControlScript = GameObject.Find("SFXControl").GetComponent <SfxControl>(); pickedUpNameText = GameObject.Find("PickedUpText").GetComponent <Text>(); PickupImage = GameObject.Find("PickUp").GetComponent <Image>();//update charControlScript = GameObject.Find("Avatar").GetComponent <CharControl>(); }
void Start() { rb = GameObject.Find("Avatar").GetComponent <Rigidbody>(); story = GameObject.Find("StorySystemObject").GetComponent <StorySystem>(); story2 = GameObject.Find("Avatar").GetComponent <StoryChecker>(); WalkPoints = GameObject.FindGameObjectsWithTag(this.tag + " Waypoint"); for (int x = 0; x < WalkPoints.Length; x++) { WalkPoints[x] = GameObject.Find(this.tag + " Waypoints " + (x + 1)); } WalkPointskid = WalkPoints[0].GetComponentsInChildren <Transform>();//Not needed really tbh randomizer = Random.Range(1, WalkPointskid.Length); _navMeshAgent = this.GetComponent <NavMeshAgent>(); NPCAnimScript = GetComponent <NPC_AnimationManager>(); }
private void Awake() { #region Giving variable values floattimer = 10f; //TabManaging = GameObject.Find("TabManager").GetComponent<tabchanger>(); storycheck = GameObject.Find("Avatar").GetComponent <StoryChecker>(); Controller = transform.GetComponent <CharControl>(); woosh = GetComponent <AudioSource>(); rb = GetComponent <Rigidbody>(); if (storycheck.DemoMode) { inventory = GameObject.FindGameObjectWithTag("itemui"); } #endregion #region setting variable status respawnertext.enabled = false; inventory.SetActive(false); Cursor.visible = false; #endregion }
private void Awake() { storycheck = GetComponent <StoryChecker>(); character = GetComponent <CharControl2>(); }