mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-12-18 08:23:08 +00:00
42 lines
980 B
C#
42 lines
980 B
C#
|
using UnityEngine;
|
||
|
using SanAndreasUnity.Utilities;
|
||
|
using SanAndreasUnity.Importing.Animation;
|
||
|
|
||
|
namespace SanAndreasUnity.Behaviours.Peds.States
|
||
|
{
|
||
|
|
||
|
public class StandAimState : BaseAimMovementState
|
||
|
{
|
||
|
public override AnimId aimWithArm_LowerAnim { get { return m_ped.CurrentWeapon.IdleAnim; } }
|
||
|
|
||
|
|
||
|
public override void OnBecameActive ()
|
||
|
{
|
||
|
base.OnBecameActive ();
|
||
|
// m_ped.PlayerModel.PlayAnim (AnimGroup.MyWalkCycle, AnimIndex.GUN_STAND);
|
||
|
}
|
||
|
|
||
|
protected override AnimationState UpdateAnimsNonAWA ()
|
||
|
{
|
||
|
return StandAimState.UpdateAnimsNonAWA (m_ped);
|
||
|
}
|
||
|
|
||
|
public static AnimationState UpdateAnimsNonAWA(Ped ped)
|
||
|
{
|
||
|
|
||
|
ped.PlayerModel.Play2Anims( ped.CurrentWeapon.AimAnim, ped.CurrentWeapon.AimAnimLowerPart );
|
||
|
|
||
|
// some anims don't set root frame velocity, so we have to set it
|
||
|
ped.PlayerModel.RootFrame.LocalVelocity = Vector3.zero;
|
||
|
|
||
|
var state = ped.PlayerModel.LastAnimState;
|
||
|
state.wrapMode = WrapMode.ClampForever;
|
||
|
|
||
|
|
||
|
return state;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|