// Use this for initialization void Start () { animator = GetComponent<Animator> (); if (animator.layerCount > 1) { int index = animator.GetLayerIndex("ArmLayer"); animator.SetLayerWeight(index,1.0f); } }
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); }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (firstSetting) { this.controller = animator.GetComponent<ControllerAIHumanoid>(); this.shootingLayer = animator.GetLayerIndex("Shoot"); this.firstSetting = false; } animator.SetLayerWeight(shootingLayer, 1f); }
public EnemyAnimation(Animator animator) { if (animator == null) Debug.Log("Enemy has been created without an animator on it blud"); _animator = animator; _baseLayer = _animator.GetLayerIndex("Base Layer"); }