void OnFire(GunType.GunMode typeMode) { //animation SetForceAnimation(typeMode.FireAnimationName, true); //parent unit animation if (!string.IsNullOrEmpty(typeMode.FireUnitAnimationName)) { Unit parentUnit = GetParentUnit(); if (parentUnit != null) { parentUnit.SetForceAnimation(typeMode.FireUnitAnimationName, true); } } }
void OnFire(MeleeWeaponType.MeleeWeaponMode typeMode) { //sound SoundPlay3D(typeMode.SoundFire, .5f, true); //animation SetForceAnimation(typeMode.FireAnimationName, true); //parent unit animation if (!string.IsNullOrEmpty(typeMode.FireUnitAnimationName)) { Unit parentUnit = GetParentUnit(); if (parentUnit != null) { parentUnit.SetForceAnimation(typeMode.FireUnitAnimationName, true); } } }
void OnReload() { //sound SoundPlay3D(Type.SoundReload, .5f, true); //animation SetForceAnimation(Type.ReloadAnimationName, true); //parent unit animation if (!string.IsNullOrEmpty(Type.ReloadUnitAnimationName)) { Unit parentUnit = GetParentUnit(); if (parentUnit != null) { parentUnit.SetForceAnimation(Type.ReloadUnitAnimationName, true); } } }