private void Awake() { Art = this.gameObject; m_anim = Art.GetComponent <Animator>(); //RenderGamObj = Art.transform.GetChild(2).GetComponent<Renderer>(); particileControl = GetComponent <ParticileControl>(); }
public void Initialized(AIGameManger _aIGameManger, LoadAndSave data) { IsPass = false; //Door = GameObject.FindGameObjectWithTag("StageDoor"); aIGameManger = _aIGameManger; Door = Instantiate(Resources.Load <GameObject>("Door"), StageDoorPos.position, Quaternion.identity); Door.GetComponent <DoorInfo>().NextStage = aIGameManger.StageNum + 1; Door.SetActive(false); stageData = data; particileControl = GetComponent <ParticileControl>(); }
public void Initialized(string type) { particileControl = GetComponent <ParticileControl>(); MaoTreeType = type; growMaoControl = Art.GetComponent <GrowMaoControl>(); //growMaoControl = _growMaoControl; growMaoControl.seed = Resources.Load <GameObject>("SeedMao/" + MaoTreeType); for (int i = 0; i < this.transform.GetChild(0).childCount; i++) { growMaoControl.ShootPos.Add(this.transform.GetChild(0).GetChild(i).gameObject); } CreatFinish = true; }
// Use this for initialization void Start() { ParticlePos = this.transform.position; ParticlePos.y = 0; ParticlePos += new Vector3(0, 1, 0); medicine = transform.GetChild(3).gameObject; particileControl = GetComponent <ParticileControl>(); StartCoroutine(MedicineInPut(3f, .05f)); particileControl.Play(1, 3f, ParticlePos + new Vector3(Random.Range(-5, 5), 0, Random.Range(-5, 5))); particileControl.Play(1, 3f, ParticlePos + new Vector3(Random.Range(-5, 5), 0, Random.Range(-5, 5))); particileControl.Play(1, 3f, ParticlePos + new Vector3(Random.Range(-5, 5), 0, Random.Range(-5, 5))); }
private void Awake() { particileControl = GetComponent <ParticileControl>(); //m_anim = transform.GetChild(0).GetComponent<Animator>(); m_anim = GetComponent <Animator>(); bc = GameObject.FindObjectOfType <BoxBackageUIControl>(); aIGameManger = GameObject.FindObjectOfType <AIGameManger>(); treeManger = GameObject.FindObjectOfType <TreeManger>(); GameObject.FindObjectOfType <CinemachineStateDrivenCamera>().Follow = this.transform; GameObject.FindObjectOfType <CinemachineStateDrivenCamera>().LookAt = this.transform.GetChild(0).transform; GameObject.FindObjectOfType <CinemachineStateDrivenCamera>().m_AnimatedTarget = m_anim; audioController = GetComponent <AudioController>(); updateFollow = gun.GetComponent <FixedUpdateFollow>(); }
public void Intialize() { audioController = Role.GetComponent <AudioController>(); nav = Role.GetComponent <NavMeshAgent>(); targetPos = Role.transform.GetChild(2).GetComponent <CapsuleCollider>(); targetPos.transform.parent = null; ResetTargetPos(targetPos); ModelPrefab = Role.transform.GetChild(1).gameObject; particileControl = Role.GetComponent <ParticileControl>(); //m_anim = Role.transform.GetChild(1).GetComponent<Animator>(); Debug.Log("ModelName" + ModelPrefab.name); m_anim = ModelPrefab.GetComponent <Animator>(); m_aiState = AIState.IDLE; //layersChecked = LayerMask.NameToLayer("Enemy"); SetValue(); P = GameObject.Find("RunPos").transform; }
public void PassInitialized(AIGameManger _aIGameManger, LoadAndSave data) { IsPass = true; //BoxBackageUIControl.Instance.SuccessState(); aIGameManger = _aIGameManger; Door = Instantiate(Resources.Load <GameObject>("Door"), StageDoorPos.position, Quaternion.identity); Door.GetComponent <DoorInfo>().NextStage = aIGameManger.StageNum + 1; Vector3 ChallangePos = this.transform.position; Syringe = GameObject.Instantiate(Resources.Load <GameObject>("Syringe"), ChallangePos, Quaternion.identity); medicine = Syringe.transform.GetChild(3).gameObject; medicine.transform.localScale = new Vector3(1, .1f, 1); //Syringe.SetActive(true); stageData = data; particileControl = GetComponent <ParticileControl>(); if (PlaceObj != null) { PlaceObj.SetActive(true); } //StartCoroutine(PassSpawner()); }