public virtual void SetWeaponType(EItemKey weaponRKey, EItemKey weaponLKey) { if (weaponRKey != EItemKey.None && weaponLKey != EItemKey.None) { //TODO: setup dual animation } else { EItemType weaponType = ItemsConfig.Instance.GetItem(weaponRKey != EItemKey.None ? weaponRKey : weaponLKey).Type; switch (weaponType) { case EItemType.W_Gun: _animRun = EUnitAnimationState.Run_Gun; _animAttack = EUnitAnimationState.Strike_Gun; _weaponStanceOffset = _gunStanceOffset; break; case EItemType.W_Rifle: _animRun = EUnitAnimationState.Run_Rifle; _animAttack = EUnitAnimationState.Strike_Rifle; _weaponStanceOffset = _rifleStanceOffset; break; } } }
public void Awake() { if (_animator == null) { _animator = gameObject.GetComponent <Animator>(); } _animDeath = (EUnitAnimationState)UnityEngine.Random.Range(_mainAnimationState[EUnitAnimationState.Death_FallForward], _mainAnimationState[EUnitAnimationState.Death_FallBack] + 1); if (_shootPositionTimeOffset > 0f) { _wfsAttackDelay = new WaitForSeconds(_shootPositionTimeOffset); } }
public void Awake() { if (_animator == null) { _animator = gameObject.GetComponent<Animator>(); } _animDeath = (EUnitAnimationState)UnityEngine.Random.Range(_mainAnimationState[EUnitAnimationState.Death_FallForward], _mainAnimationState[EUnitAnimationState.Death_FallBack] + 1); if (_shootPositionTimeOffset > 0f) { _wfsAttackDelay = new WaitForSeconds(_shootPositionTimeOffset); } }