private void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerInventory = player.GetComponent <Inventory>(); doorAudio = this.GetComponent <AudioSource>(); doorAnim = this.GetComponent <Animator>(); playerIK = player.GetComponent <IKHandling>(); }
private void Start() { player = GameObject.FindGameObjectWithTag("Player"); controller = player.GetComponent <FirstPersonController>(); anim = player.GetComponent <Animator>(); phone = player.GetComponent <Phone>(); ik = player.GetComponent <IKHandling>(); interact = player.GetComponent <PlayerInteract>(); }
// Use this for initialization void Start () { //animator = GetComponentInChildren<Animator> (); ikHandler = GetComponent<IKHandling> (); if (shoot) { StartCoroutine (ShootLoop ()); } }
// Use this for initialization void Start() { anim = GetComponent <Animator>(); ik = GetComponent <IKHandling>(); rigidbody = GetComponent <Rigidbody>(); if (rFoot == null) { rFoot = anim.GetBoneTransform(HumanBodyBones.RightFoot); } if (lFoot == null) { lFoot = anim.GetBoneTransform(HumanBodyBones.LeftFoot); } }
private void Start() { // Disable player player = GameObject.FindGameObjectWithTag("Player"); anim = player.GetComponent <Animator>(); controller = player.GetComponent <FirstPersonController>(); ik = player.GetComponent <IKHandling>(); playerAudio = player.GetComponent <AudioSource>(); phone = player.GetComponent <Phone>(); controller.enabled = false; ik.ikWeightRight = 0; ik.ikWeightLeft = 0; ik.enabled = false; playerAudio.PlayOneShot(jumpScareSound, 1); phone.enabled = false; cam.transform.parent = animationParent; anim.SetBool("knockedOut", true); StartCoroutine(FadeSwitch()); StartCoroutine(ChangeScene()); }
void Start() { //Set state character Instance = this; characterController = this.GetComponent <CharacterController>(); anim = this.GetComponent <Animator>(); // 找出IK控制script ikHanlding = GetComponent <IKHandling>(); mObjects = new GameObject[6]; for (int i = 0; i < 6; i++) { mObjects[i] = GameObject.Find("PopValCtrl[" + i + "]"); } //animationManager = this.GetComponent<AnimationManager>(); speedMove = GameAttribute.Instance.speed; jumpSecond = false; magnet.SetActive(false); stopFly(); TrapManager.Instance.enableAllTraps(true); Invoke("WaitStart", 0.2f); }
private void Start() { cam = Camera.main; playerIK = this.GetComponent <IKHandling>(); }