Show / Hide Table of Contents

Class FPSWeapon

Renders first-person weapons and attack animations. Recommended for this component to be on its own game object. Cam modify pitch of audio source for different weapon speed effects.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
FPSWeapon
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(DaggerfallAudioSource))]
public class FPSWeapon : MonoBehaviour

Fields

| Improve this Doc View Source

AttackSpeedScale

Declaration
public float AttackSpeedScale
Field Value
Type Description
Single
| Improve this Doc View Source

Cooldown

Declaration
public float Cooldown
Field Value
Type Description
Single
| Improve this Doc View Source

DrawWeaponSound

Declaration
public SoundClips DrawWeaponSound
Field Value
Type Description
SoundClips
| Improve this Doc View Source

FlipHorizontal

Declaration
public bool FlipHorizontal
Field Value
Type Description
Boolean
| Improve this Doc View Source

MetalType

Declaration
public MetalTypes MetalType
Field Value
Type Description
MetalTypes
| Improve this Doc View Source

Reach

Declaration
public float Reach
Field Value
Type Description
Single
| Improve this Doc View Source

ShowWeapon

Declaration
public bool ShowWeapon
Field Value
Type Description
Boolean
| Improve this Doc View Source

SwingWeaponSound

Declaration
public SoundClips SwingWeaponSound
Field Value
Type Description
SoundClips
| Improve this Doc View Source

WeaponHands

Declaration
public ItemHands WeaponHands
Field Value
Type Description
ItemHands
| Improve this Doc View Source

WeaponType

Declaration
public WeaponTypes WeaponType
Field Value
Type Description
WeaponTypes

Properties

| Improve this Doc View Source

WeaponState

Declaration
public WeaponStates WeaponState { get; }
Property Value
Type Description
WeaponStates

Methods

| Improve this Doc View Source

ChangeWeaponState(WeaponStates)

Declaration
public void ChangeWeaponState(WeaponStates state)
Parameters
Type Name Description
WeaponStates state
| Improve this Doc View Source

GetAnimTime()

Declaration
public float GetAnimTime()
Returns
Type Description
Single
| Improve this Doc View Source

GetCurrentFrame()

Declaration
public int GetCurrentFrame()
Returns
Type Description
Int32
| Improve this Doc View Source

GetHitFrame()

Declaration
public int GetHitFrame()
Returns
Type Description
Int32
| Improve this Doc View Source

IsAttacking()

Declaration
public bool IsAttacking()
Returns
Type Description
Boolean
| Improve this Doc View Source

OnAttackDirection(WeaponManager.MouseDirections)

Declaration
public void OnAttackDirection(WeaponManager.MouseDirections direction)
Parameters
Type Name Description
WeaponManager.MouseDirections direction
| Improve this Doc View Source

PlayActivateSound()

Declaration
public void PlayActivateSound()
| Improve this Doc View Source

PlayAttackVoice(SoundClips)

Declaration
public void PlayAttackVoice(SoundClips customSound = SoundClips.None)
Parameters
Type Name Description
SoundClips customSound
| Improve this Doc View Source

PlaySwingSound()

Declaration
public void PlaySwingSound()

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX