public void FromAvatarAnimToWeaponAnimProgress(IAdaptiveContainer <IFsmInputCommand> commands, GameObject weaponP1, GameObject weaponP3, IWeaponAnimProgress progress) { progress.FirstPersonAnimName = string.Empty; progress.ThirdPersonAnimName = string.Empty; for (int i = 0; i < commands.Length; ++i) { var cmd = commands[i]; string animName; if (MonitoredWeaponAnimP3.TryGetValue(cmd.Type, out animName) && weaponP3 != null && IsAnimationExist(weaponP3, animName)) { progress.ThirdPersonAnimName = animName; progress.ThirdPersonAnimProgress = cmd.AdditioanlValue; } if (MonitoredWeaponAnimP1.TryGetValue(cmd.Type, out animName) && weaponP1 != null && IsAnimationExist(weaponP1, animName)) { progress.FirstPersonAnimName = animName; progress.FirstPersonAnimProgress = cmd.AdditioanlValue; } } }
public void FromWeaponAnimProgressToWeaponAnim(GameObject weaponP1, GameObject weaponP3, IWeaponAnimProgress progress) { if (weaponP1 != null) { SetNormalizedTime(weaponP1, progress.FirstPersonAnimName, progress.FirstPersonAnimProgress); } if (weaponP3 != null) { SetNormalizedTime(weaponP3, progress.ThirdPersonAnimName, progress.ThirdPersonAnimProgress); } }
public void FromWeaponAnimProgressToWeaponAnim(GameObject weaponP1, GameObject weaponP3, IWeaponAnimProgress progress) { if (weaponP1 != null) { WeaponAnimationBase.FinishedWeaponAnimation(weaponP1); WeaponAnimationBase.SetNormalizedTime(weaponP1, progress.FirstPersonAnimName, progress.FirstPersonAnimProgress); } if (weaponP3 != null) { WeaponAnimationBase.FinishedWeaponAnimation(weaponP3); WeaponAnimationBase.SetNormalizedTime(weaponP3, progress.ThirdPersonAnimName, progress.ThirdPersonAnimProgress); } }
public void WeaponAnimFinishedUpdate(IAdaptiveContainer <IFsmInputCommand> commands, GameObject weaponP1, GameObject weaponP3, IWeaponAnimProgress progress) { for (int i = 0; i < commands.Length; ++i) { var cmd = commands[i]; if (MonitoredWeaponAnimFinish.ContainsKey(cmd.Type)) { FinishedWeaponAnimation(weaponP1); FinishedWeaponAnimation(weaponP3); progress.FirstPersonAnimProgress = 0; progress.ThirdPersonAnimProgress = 0; return; } } }