// Use this for initialization void Start() { depthManager = gameObject.transform.Find("Sprite").GetComponentInChildren <DepthManager>(); appliedSkillList = new List <SkillInfo>(); gameUpdater = GameObject.Find("Updater").transform.GetComponent <GameUpdater>(); GameObject UI_Root = GameObject.Find("UI Root"); UICam = UI_Root.transform.Find("Camera(UI)").GetComponent <Camera>(); TopLeftAnchor = UI_Root.transform.Find("TopLeftAnchor").gameObject; TopRightAnchor = UI_Root.transform.Find("TopRightAnchor").gameObject; GameObject BottonRightAnchor = UI_Root.transform.Find("BottonRightAnchor").gameObject; GameObject MaxSpawnPosY = UI_Root.transform.Find("MaxSpawnPosY").gameObject; RandomPosY = Random.Range(BottonRightAnchor.transform.position.y, MaxSpawnPosY.transform.position.y); gameObject.transform.position = new Vector3(BottonRightAnchor.transform.position.x, RandomPosY, gameObject.transform.position.z); gameObject.transform.localPosition = new Vector3(gameObject.transform.localPosition.x, gameObject.transform.localPosition.y, -1); animation = gameObject.transform.Find("Sprite").GetComponentInChildren <Animation>(); skillEffectSystem = GameObject.Find("Updater").transform.Find("SkillEffectSystem").GetComponent <SkillEffectSystem>(); }
// Use this for initialization void Start() { bgm = GameObject.Find("UI Root").transform.Find("Camera(UI)").Find("BGM").GetComponent <AudioVolumeManager>(); zombieList = new List <GameObject>(); World = GameObject.Find("UI Root").transform.Find("Panel(World)").gameObject; zombieList = new List <GameObject>(); skillEffectSystem = GameObject.Find("Updater").transform.Find("SkillEffectSystem").GetComponent <SkillEffectSystem>(); SpawnCurrTime = 0; checkSignList = new List <GameObject>(); if (is_infiniteStage == true) { stageTrigger = true; StageCount = 0; } }