public void Init(string letter) { anim = GetComponent<Animator>(); //this is getting called before start for char asciiLetter = letter.ToCharArray ()[0]; int stateLayerIndex = System.Convert.ToInt32 (asciiLetter) - 97; anim.SetLayerWeight(0,1f); anim.SetLayerWeight(stateLayerIndex +1,1f); }
void Start() { anim = GetComponent<Animator>(); if (anim.layerCount == 3) { anim.SetLayerWeight(1, 1); anim.SetLayerWeight(2, 1); } tick = 0; }
void Awake() { nav = GetComponent<NavMeshAgent>(); anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashIDs>(); nav.updateRotation = false; animSetup = new AnimatorSetup(anim, hash); anim.SetLayerWeight(1, 1f); anim.SetLayerWeight(2, 1f); deadZone *= Mathf.Deg2Rad; }
void Awake() { animtor = GetComponent<Animator>(); navAgent = GetComponent<NavMeshAgent>(); opticSphereCol = GetComponent<SphereCollider>(); playerGameObject = GameObject.FindGameObjectWithTag(DoneTags.player); animatorController = GameObject.Find(PathHelper.gameManagerPath).GetComponent<EnemyAnimatorController>(); gameManager = GameObject.Find(PathHelper.gameManagerPath).GetComponent<GameManager>(); enemyStatus = gameObject.transform.FindChild(GameObjectNameHelper.robotGuardName).GetComponent<EnemyStatus>(); animtor.SetLayerWeight(1, 1f); animtor.SetLayerWeight(2, 1f); }
void Awake() { playerRigidbody = GetComponent<Rigidbody>(); anim = GetComponent<Animator>(); if (anim.layerCount == 2) anim.SetLayerWeight(1, 1); }
void Start() { controller = GetComponent<CharacterController>(); animator = GetComponent<Animator>(); if(animator.layerCount >= 2) animator.SetLayerWeight(1, 1); }
void Start() { // initialising reference variables anim = GetComponent<Animator>(); if(anim.layerCount ==2) anim.SetLayerWeight(1, 1); }
void Start() { playerPhysics = GetComponent<PlayerPhysics>(); animator = GetComponent<Animator>(); animator.SetLayerWeight(1, 1); }
private void Awake() { anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameConstroller).GetComponent<HashIDs>(); anim.SetLayerWeight(1, 1f); }
// Use this for initialization void Start() { animator = GetComponent<Animator>(); if(animator.layerCount >= 2) animator.SetLayerWeight(1, 1); }
/// <summary> /// Inicia o jogador /// </summary> void Start() { playerPhysics = GetComponent<PlayerPhysics>(); animator = GetComponent<Animator>(); manager = Camera.main.GetComponent<GameManager>(); animator.SetLayerWeight(0, 0); }
void Awake() { // Setting up the references. anim = GetComponent<Animator>(); // Set the weight of the shouting layer to 1. anim.SetLayerWeight(1, 1f); }
protected virtual void Start() { anim = GetComponent<Animator>(); actor = GetComponent<Actor>(); col = GetComponent<CapsuleCollider>(); colHeightOrigin = col.height; colCenterOrigin = col.center; anim.SetLayerWeight(upperBodyLayerIndex, 1); }
void Awake() { rigidbody = GetComponent<Rigidbody> (); audio = GetComponent<AudioSource> (); anim = GetComponent<Animator> (); hash = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<HashIDs> (); anim.SetLayerWeight (1, 1f); }
// Use this for initialization void Start () { animator = GetComponent<Animator> (); if (animator.layerCount > 1) { int index = animator.GetLayerIndex("ArmLayer"); animator.SetLayerWeight(index,1.0f); } }
void Awake() { anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashIds>(); targetDirection = new Vector3(); anim.SetLayerWeight(1, 0.8f); }
void Start() { animator = GetComponent<Animator>(); motor = GetComponent<EnemyMotor>(); logic = GetComponent<EnemyLogic>(); animator.SetBool("Jumping",false); animator.SetLayerWeight(1,1); }
void Start(){ m_Cam = Camera.main.transform; animator = GetComponent<Animator>(); m_Rigidbody = GetComponent<Rigidbody>(); if (animator.layerCount >= 2) { animator.SetLayerWeight(1, 1); } }
void Start() { animator = GetComponent<Animator>(); if (animator.layerCount >= 2){ animator.SetLayerWeight(1,1); m_LocomotionId = Animator.StringToHash("Base Layer.Locomotion"); } }
void Start () { // initialising reference variables anim = gameObject.GetComponent<Animator>(); col = gameObject.GetComponent<CapsuleCollider>(); if(anim.layerCount ==2) anim.SetLayerWeight(1, 1); }
void Awake() { player = GameObject.FindGameObjectWithTag(Tags.player).transform; enemySight = GetComponent<EnemySight>(); nav = GetComponent<NavMeshAgent>(); anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashIDs>(); nav.updateRotation = false; //To make sure that the rotation of the enemy is set by the animator and not by the nav mesh agent - To reduce foot slipping whilst turning corners animSetup = new AnimatorSetup(anim, hash); anim.SetLayerWeight(1, 1f); //Shooting Layer anim.SetLayerWeight(2, 1f); //Gun Layer deadZone *= Mathf.Deg2Rad; //Convert from degrees to radians }
// Use this for initialization void Start () { animator = GetComponent<Animator>(); m_PhotonView = GetComponent<PhotonView>(); m_TransformView = GetComponent<PhotonTransformView>(); if(animator.layerCount >= 2) animator.SetLayerWeight(1, 1); }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (firstSetting) { this.shootingLayer = animator.GetLayerIndex("Shoot"); this.firstSetting = false; } animator.SetLayerWeight(shootingLayer, 0.4f); }
// Use this for initialization void Start () { animator = GetComponent<Animator>(); // assign the Animator component if(animator && animator.layerCount > 1) animator.SetLayerWeight(1,1.0f); // set layer 1's weight to 1 rb = GetComponent<Rigidbody> (); }
void Awake() { _animator = GetComponentInChildren<Animator>(); _agent = GetComponentInChildren<Agent>(); _controller = GetComponent<CRController>(); if(_animator && _animator.layerCount >= 2) _animator.SetLayerWeight(1, 1); }
// Use this for initialization void Start() { animator = GetComponent<Animator>(); TextColor = start.GetComponent<Renderer> ().material.color; if(animator.layerCount >= 2) animator.SetLayerWeight(1, 1); }
void Awake() { // Setting up the references. anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashIDs>(); // Set the weight of the shouting layer to 1. anim.SetLayerWeight(1, 1f); }
void Awake() { animator = GetComponent<Animator> (); hash = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent < HashIDs> (); bulletShooting = GameObject.FindGameObjectsWithTag("PlayerBullet"); countdownController = GameObject.FindGameObjectWithTag (Tags.gameController); rigidbody = GetComponent<Rigidbody> (); animator.SetLayerWeight (1, 1f); }
void Start() { playerPhysics = GetComponent<PlayerPhysics>(); animator = GetComponent<Animator>(); manager = Camera.main.GetComponent<GameManager>(); animator.SetLayerWeight(1,1); throwing = false; facingRight = true; }
void Start () { // initialising reference variables anim = GetComponent<Animator>(); col = GetComponent<CapsuleCollider>(); enemy = GameObject.Find("Enemy").transform; if(anim.layerCount ==2) anim.SetLayerWeight(1, 1); }
public static void SetLayersWeight(this Animator anim, string strNamePartial, float fWeight) { for (int i = 0; i < anim.layerCount; i++) { string strName = anim.GetLayerName(i); if (!strName.StartsWith(strNamePartial)) { continue; } anim.SetLayerWeight(i, fWeight); } }
public override void OnEnter() { animator = ownerDefault.GetComponent <UnityEngine.Animator> (); animator.SetLayerWeight(layer, owner.GetValue(weight)); Finish(); }
public override void OnEnter() { animator.SetLayerWeight(layer, weight); Finish(); }