Corgi Engine v9.4
Loading...
Searching...
No Matches
MoreMountains.CorgiEngine.Weapon Class Reference

This base class, meant to be extended (see ProjectileWeapon.cs for an example of that) handles rate of fire (rate of use actually), and ammo reloading. More...

Inheritance diagram for MoreMountains.CorgiEngine.Weapon:
MoreMountains.Tools.MMMonoBehaviour MoreMountains.CorgiEngine.ChargeWeapon MoreMountains.CorgiEngine.HitscanWeapon MoreMountains.CorgiEngine.MeleeWeapon MoreMountains.CorgiEngine.ProjectileWeapon

Public Types

enum  TriggerModes { SemiAuto , Auto }
 the possible use modes for the trigger More...
enum  WeaponStates {
  WeaponIdle , WeaponStart , WeaponDelayBeforeUse , WeaponUse ,
  WeaponDelayBetweenUses , WeaponStop , WeaponReloadNeeded , WeaponReloadStart ,
  WeaponReload , WeaponReloadStop , WeaponInterrupted , WeaponInCooldown
}
 the possible states the weapon can be in More...

Public Member Functions

virtual void Initialization ()
 Initialize this weapon.
virtual void InitializeComboWeapons ()
 Initializes the combo comp if found.
virtual void SetOwner (Character newOwner, CharacterHandleWeapon handleWeapon)
 Sets the weapon's owner.
virtual void WeaponInputStart ()
 Called by input, turns the weapon on.
virtual void WeaponInputReleased ()
 Describes what happens when the weapon's input gets released.
virtual void WeaponInputStop ()
 Called by input, turns the weapon off if in auto mode.
virtual void TurnWeaponOn ()
 Describes what happens when the weapon starts.
virtual void TurnWeaponOff ()
 Turns the weapon off.
virtual void Interrupt ()
 Call this method to interrupt the weapon.
virtual bool WeaponInCooldown ()
virtual void SetCooldownStartAt ()
virtual void ResetCooldown ()
 Lets you reset the cooldown of the weapon.
virtual IEnumerator ShootRequestCo ()
 Determines whether or not the weapon can fire.
virtual void InitiateReloadWeapon ()
virtual void FlipWeapon ()
 Flips the weapon.
virtual void FlipWeaponModel ()
 Flips the weapon model.
virtual IEnumerator WeaponDestruction ()
 Destroys the weapon.
virtual void ApplyRecoil (bool shouldApplyRecoil, WeaponRecoilProperties properties)
virtual void InitializeAnimatorParameters ()
 Adds required animator parameters to the animator parameters list if they exist.
virtual void UpdateAnimator ()
 Override this to send parameters to the character's animator. This is called once per cycle, by the Character class, after Early, normal and Late process().
virtual void ResetComboAnimatorParameter ()
virtual void ResetAnimatorParameters ()
virtual void WeaponHit ()
virtual void WeaponHitDamageable ()
virtual void WeaponHitNonDamageable ()
virtual void WeaponMiss ()
virtual void WeaponKill ()

Public Attributes

TriggerModes TriggerMode = TriggerModes.Auto
 is this weapon on semi or full auto ?
bool Interruptable = false
 whether or not this weapon can be interrupted
bool InitializeOnStart = false
 If this is true, the weapon will initialize itself on start, otherwise it'll have to be init manually, usually by the CharacterHandleWeapon class.
float DelayBeforeUse = 0f
 the delay before use, that will be applied for every shot
bool DelayBeforeUseReleaseInterruption = true
 whether or not the delay before used can be interrupted by releasing the shoot button (if true, releasing the button will cancel the delayed shot)
float TimeBetweenUses = 1f
 the time (in seconds) between two shots
bool TimeBetweenUsesReleaseInterruption = true
 whether or not the time between uses can be interrupted by releasing the shoot button (if true, releasing the button will cancel the time between uses)
float CooldownDuration = 0f
 a duration, in seconds, at the end of the weapon's life cycle and before going back to Idle
bool UseBurstMode = false
 if this is true, the weapon will activate repeatedly for every shoot request
int BurstLength = 3
 the amount of 'shots' in a burst sequence
float BurstTimeBetweenShots = 0.1f
 the time between shots in a burst sequence (in seconds)
bool MagazineBased = false
 whether or not the weapon is magazine based. If it's not, it'll just take its ammo inside a global pool
int MagazineSize = 30
 the size of the magazine
bool AutoReload
 if this is true, pressing the fire button when a reload is needed will reload the weapon. Otherwise you'll need to press the reload button
float ReloadTime = 2f
 the time it takes to reload the weapon
int AmmoConsumedPerShot = 1
 the amount of ammo consumed everytime the weapon fires
bool AutoDestroyWhenEmpty
 if this is set to true, the weapon will auto destroy when there's no ammo left
float AutoDestroyWhenEmptyDelay = 1f
 the delay (in seconds) before weapon destruction if empty
int CurrentAmmoLoaded = 0
 the current amount of ammo loaded inside the weapon
Vector3 WeaponAttachmentOffset = Vector3.zero
 an offset that will be applied to the weapon once attached to the center of the WeaponAttachment transform.
bool FlipWeaponOnCharacterFlip = true
 should that weapon be flipped when the character flips ?
Vector3 FlipValue = new Vector3(-1,1,1)
 the FlipValue will be used to multiply the model's transform's localscale on flip. Usually it's -1,1,1, but feel free to change it to suit your model's specs
Transform LeftHandHandle
 the transform to which the character's left hand should be attached to
Transform RightHandHandle
 the transform to which the character's right hand should be attached to
bool ModifyMovementWhileEquipped = false
 if this is true, a multiplier will be applied to movement while the weapon is equipped
float PermanentMovementMultiplier = 0f
 the multiplier to apply to movement while equipped
bool ModifyMovementWhileAttacking = false
 if this is true, a multiplier will be applied to movement while the weapon is active
float MovementMultiplier = 0f
 the multiplier to apply to movement while attacking
bool AlwaysResetMultiplierToInitial = true
 if this is true, movement will always be reset to initial speed after a multiplier stops being applied
bool PreventHorizontalGroundMovementWhileInUse = false
 if this is true all movement will be prevented (even flip) while the weapon is active
bool PreventHorizontalAirMovementWhileInUse = false
 if this is true all horizontal air movement will be prevented (even flip) while the weapon is active
bool SetForceWhileInUse = false
 whether or not to apply a force when the weapon is in use
Vector2 ForceWhileInUse = Vector2.zero
 the force to apply when the weapon is in use, if SetForceWhileInUse is true
bool DisableGravityWhileInUse = false
 whether or not to disable gravity while the weapon is in use
bool PreventFlipWhileInUse = false
 whether or not to disable flip while the weapon is in use
List< Animator > Animators
 the other animators (other than the Character's) that you want to update every time this weapon gets used
bool MirrorCharacterAnimatorParameters = false
 if this is true, the weapon's animator(s) will mirror the animation parameter of the owner character (that way your weapon's animator will be able to "know" if the character is walking, jumping, etc)
string EquippedAnimationParameter
string IdleAnimationParameter
 the name of the weapon's idle animation parameter : this will be true all the time except when the weapon is being used
string StartAnimationParameter
 the name of the weapon's start animation parameter : true at the frame where the weapon starts being used
string DelayBeforeUseAnimationParameter
 the name of the weapon's delay before use animation parameter : true when the weapon has been activated but hasn't been used yet
string SingleUseAnimationParameter
 the name of the weapon's single use animation parameter : true at each frame the weapon activates (shoots)
string UseAnimationParameter
 the name of the weapon's in use animation parameter : true at each frame the weapon has started firing but hasn't stopped yet
string DelayBetweenUsesAnimationParameter
 the name of the weapon's delay between each use animation parameter : true when the weapon is in use
string InCooldownAnimationParameter
 the name of the weapon's in cooldown animation parameter : true when the weapon is in cooldown
string StopAnimationParameter
 the name of the weapon stop animation parameter : true after a shot and before the next one or the weapon's stop
string ReloadStartAnimationParameter
 the name of the weapon reload start animation parameter
string ReloadAnimationParameter
 the name of the weapon reload animation parameter
string ReloadStopAnimationParameter
 the name of the weapon reload end animation parameter
string WeaponAngleAnimationParameter
 the name of the weapon's angle animation parameter
string WeaponAngleRelativeAnimationParameter
 the name of the weapon's angle animation parameter, adjusted so it's always relative to the direction the character is currently facing
MMFeedbacks WeaponStartMMFeedback
 the feedback to play when the weapon starts being used
MMFeedbacks WeaponUsedMMFeedback
 the feedback to play while the weapon is in use
MMFeedbacks WeaponStopMMFeedback
 the feedback to play when the weapon stops being used
MMFeedbacks WeaponReloadMMFeedback
 the feedback to play when the weapon gets reloaded
MMFeedbacks WeaponReloadNeededMMFeedback
 the feedback to play when the weapon gets reloaded
MMFeedbacks WeaponOnHitFeedback
 A MMFeedback to play when the weapon hits anything (damageable or not)
MMFeedbacks WeaponOnMissFeedback
 A MMFeedback to play when the weapon misses (what constitutes a miss is defined per Weapon subclass)
MMFeedbacks WeaponOnHitDamageableFeedback
 A MMFeedback to play when the weapon hits a damageable.
MMFeedbacks WeaponOnHitNonDamageableFeedback
 A MMFeedback to play when the weapon hits a non damageable object.
MMFeedbacks WeaponOnKillFeedback
 A MMFeedback to play when the weapon kills something.
bool ApplyRecoilOnUse = false
 Whether or not to apply recoil to the Weapon owner every time this weapon gets used, regardless of the outcome.
WeaponRecoilProperties RecoilOnUseProperties
 The recoil to apply every time this weapon gets used.
bool ApplyRecoilOnHitDamageable = false
 Whether or not to apply recoil to the Weapon owner every time this weapon hits a damageable object (an object with a Health component, basically)
WeaponRecoilProperties RecoilOnHitDamageableProperties
 the recoil to apply when this weapon hits a damageable
bool ApplyRecoilOnHitNonDamageable = false
 Whether or not to apply recoil to the Weapon owner every time this weapon hits a non damageable object (a platform, prop, etc)
WeaponRecoilProperties RecoilOnHitNonDamageableProperties
 the recoil to apply when this weapon hits a non damageable
bool ApplyRecoilOnMiss = false
 Whether or not to apply recoil to the Weapon owner every time the weapon misses its hit.
WeaponRecoilProperties RecoilOnMissProperties
 the recoil to apply when this weapon hits nothing
bool ApplyRecoilOnKill = false
 Whether or not to apply recoil to the Weapon owner every time the weapon kills its target.
WeaponRecoilProperties RecoilOnKillProperties
 The recoil to apply on kill.
MMStateMachine< WeaponStatesWeaponState
 the weapon's state machine

Protected Member Functions

virtual void Start ()
virtual void InitializeFeedbacks ()
 Initializes all the feedbacks associated to this weapon.
virtual void Update ()
 On Update, we check if the weapon is or should be used.
virtual void LateUpdate ()
 On LateUpdate, processes the weapon state.
virtual void PreventMovement ()
 Handles movement prevention in air or on ground.
virtual void RestoreMovement ()
virtual IEnumerator ApplyForceWhileInUseCo ()
 An internal coroutine used to apply a force while the weapon's in use.
virtual void ProcessWeaponState ()
 Called every lastUpdate, processes the weapon's state machine.
virtual void CaseWeaponIdle ()
virtual void CaseWeaponStart ()
virtual void CaseWeaponDelayBeforeUse ()
virtual void CaseWeaponUse ()
virtual void CaseWeaponDelayBetweenUses ()
virtual void CaseWeaponStop ()
virtual void CaseWeaponInCooldown ()
virtual void CaseWeaponReloadNeeded ()
virtual void CaseWeaponReloadStart ()
virtual void CaseWeaponReload ()
virtual void CaseWeaponReloadStop ()
virtual void CaseWeaponInterrupted ()
virtual void WeaponUse ()
 When the weapon is used, plays the corresponding sound.
virtual void ShootRequest ()
 Determines whether or not the weapon can fire.
virtual void ResetMovementMultiplier ()
virtual void ReloadNeeded ()
 Describes what happens when the weapon needs a reload.
virtual void ReloadWeapon ()
 Reloads the weapon.
virtual void ApplyOffset ()
 Applies the offset specified in the inspector.
virtual IEnumerator ApplyRecoilCoroutine (WeaponRecoilProperties properties)
virtual void ApplyRecoilInternal (WeaponRecoilProperties properties)
virtual Vector2 GetRecoilDirection (WeaponRecoilProperties properties)
virtual void TriggerWeaponStartFeedback ()
 Plays the weapon's start sound.
virtual void TriggerWeaponUsedFeedback ()
 Plays the weapon's used sound.
virtual void TriggerWeaponStopFeedback ()
 Plays the weapon's stop sound.
virtual void TriggerWeaponReloadNeededFeedback ()
 Plays the weapon's reload needed sound.
virtual void TriggerWeaponReloadFeedback ()
 Plays the weapon's reload sound.
virtual void TriggerWeaponOnHitFeedback ()
 Plays a feedback when the weapon hits something.
virtual void TriggerWeaponOnMissFeedback ()
 Plays a feedback when the weapon doesn't hit something.
virtual void TriggerWeaponOnHitDamageableFeedback ()
 Plays a feedback when the weapon hits a damageable.
virtual void TriggerWeaponOnHitNonDamageableFeedback ()
 Plays a feedback when the weapon hits a non damageable.
virtual void TriggerWeaponOnKillFeedback ()
 Plays a feedback when the weapon kills something.
virtual void AddParametersToAnimator (Animator animator, HashSet< int > list)
virtual void UpdateAnimator (Animator animator, HashSet< int > list)
virtual void ResetAnimatorParameters (Animator animator, HashSet< int > list)
virtual void OnDisable ()

Protected Attributes

SpriteRenderer _spriteRenderer
CharacterGravity _characterGravity
CorgiController _controller
CharacterHorizontalMovement _characterHorizontalMovement
WeaponAim _aimableWeapon
float _permanentMovementMultiplierStorage = 1f
float _movementMultiplierStorage = 1f
Animator _ownerAnimator
float _delayBeforeUseCounter = 0f
float _delayBetweenUsesCounter = 0f
float _cooldownStartAt = float.NegativeInfinity
float _reloadingCounter = 0f
bool _triggerReleased = false
bool _reloading = false
ComboWeapon _comboWeapon
Vector3 _weaponOffset
Vector3 _weaponAttachmentOffset
Transform _weaponAttachment
List< HashSet< int > > _animatorParameters
HashSet< int > _ownerAnimatorParameters
bool _initialized = false
bool _applyForceWhileInUse = false
Vector2 _forceWhileInUse
bool _movementMultiplierNeedsResetting = false
int _equippedAnimationParameter
int _idleAnimationParameter
int _startAnimationParameter
int _delayBeforeUseAnimationParameter
int _singleUseAnimationParameter
int _useAnimationParameter
int _delayBetweenUsesAnimationParameter
int _inCooldownAnimationParameter
int _stopAnimationParameter
int _reloadStartAnimationParameter
int _reloadAnimationParameter
int _reloadStopAnimationParameter
int _weaponAngleAnimationParameter
int _weaponAngleRelativeAnimationParameter
int _aliveAnimationParameter
int _comboInProgressAnimationParameter
Vector2 _recoilDirection
bool _characterHorizontalMovementNotNull = false
bool _controllerNotNull = false
float _lastTurnWeaponOnAt = -float.MaxValue
bool _gravityBeforeUse = true
bool _canFlipBeforeUse = true
Vector3 _newHandleAngles

Static Protected Attributes

const string _aliveAnimationParameterName = "Alive"

Properties

string WeaponID [get, set]
 the name of the inventory item corresponding to this weapon. Automatically set (if needed) by InventoryEngineWeapon
Character Owner [get, protected set]
 the weapon's owner
CharacterHandleWeapon CharacterHandleWeapon [get, set]
 the weapon's owner's CharacterHandleWeapon component
bool Flipped [get, set]
 if true, the weapon is flipped
WeaponAmmo WeaponAmmo [get, protected set]
 the WeaponAmmo component optionnally associated to this weapon

Detailed Description

This base class, meant to be extended (see ProjectileWeapon.cs for an example of that) handles rate of fire (rate of use actually), and ammo reloading.

Member Enumeration Documentation

◆ TriggerModes

the possible use modes for the trigger

Enumerator
SemiAuto 
Auto 

◆ WeaponStates

the possible states the weapon can be in

Enumerator
WeaponIdle 
WeaponStart 
WeaponDelayBeforeUse 
WeaponUse 
WeaponDelayBetweenUses 
WeaponStop 
WeaponReloadNeeded 
WeaponReloadStart 
WeaponReload 
WeaponReloadStop 
WeaponInterrupted 
WeaponInCooldown 

Member Function Documentation

◆ AddParametersToAnimator()

virtual void MoreMountains.CorgiEngine.Weapon.AddParametersToAnimator ( Animator animator,
HashSet< int > list )
protectedvirtual

◆ ApplyForceWhileInUseCo()

virtual IEnumerator MoreMountains.CorgiEngine.Weapon.ApplyForceWhileInUseCo ( )
protectedvirtual

An internal coroutine used to apply a force while the weapon's in use.

Returns

◆ ApplyOffset()

virtual void MoreMountains.CorgiEngine.Weapon.ApplyOffset ( )
protectedvirtual

Applies the offset specified in the inspector.

◆ ApplyRecoil()

virtual void MoreMountains.CorgiEngine.Weapon.ApplyRecoil ( bool shouldApplyRecoil,
WeaponRecoilProperties properties )
virtual

◆ ApplyRecoilCoroutine()

virtual IEnumerator MoreMountains.CorgiEngine.Weapon.ApplyRecoilCoroutine ( WeaponRecoilProperties properties)
protectedvirtual

◆ ApplyRecoilInternal()

virtual void MoreMountains.CorgiEngine.Weapon.ApplyRecoilInternal ( WeaponRecoilProperties properties)
protectedvirtual

◆ CaseWeaponDelayBeforeUse()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponDelayBeforeUse ( )
protectedvirtual

◆ CaseWeaponDelayBetweenUses()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponDelayBetweenUses ( )
protectedvirtual

◆ CaseWeaponIdle()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponIdle ( )
protectedvirtual

◆ CaseWeaponInCooldown()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponInCooldown ( )
protectedvirtual

◆ CaseWeaponInterrupted()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponInterrupted ( )
protectedvirtual

◆ CaseWeaponReload()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponReload ( )
protectedvirtual

◆ CaseWeaponReloadNeeded()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponReloadNeeded ( )
protectedvirtual

◆ CaseWeaponReloadStart()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponReloadStart ( )
protectedvirtual

◆ CaseWeaponReloadStop()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponReloadStop ( )
protectedvirtual

◆ CaseWeaponStart()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponStart ( )
protectedvirtual

◆ CaseWeaponStop()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponStop ( )
protectedvirtual

◆ CaseWeaponUse()

virtual void MoreMountains.CorgiEngine.Weapon.CaseWeaponUse ( )
protectedvirtual

◆ FlipWeapon()

virtual void MoreMountains.CorgiEngine.Weapon.FlipWeapon ( )
virtual

Flips the weapon.

Reimplemented in MoreMountains.CorgiEngine.ChargeWeapon.

◆ FlipWeaponModel()

virtual void MoreMountains.CorgiEngine.Weapon.FlipWeaponModel ( )
virtual

Flips the weapon model.

◆ GetRecoilDirection()

virtual Vector2 MoreMountains.CorgiEngine.Weapon.GetRecoilDirection ( WeaponRecoilProperties properties)
protectedvirtual

◆ Initialization()

virtual void MoreMountains.CorgiEngine.Weapon.Initialization ( )
virtual

◆ InitializeAnimatorParameters()

virtual void MoreMountains.CorgiEngine.Weapon.InitializeAnimatorParameters ( )
virtual

Adds required animator parameters to the animator parameters list if they exist.

◆ InitializeComboWeapons()

virtual void MoreMountains.CorgiEngine.Weapon.InitializeComboWeapons ( )
virtual

Initializes the combo comp if found.

◆ InitializeFeedbacks()

virtual void MoreMountains.CorgiEngine.Weapon.InitializeFeedbacks ( )
protectedvirtual

Initializes all the feedbacks associated to this weapon.

◆ InitiateReloadWeapon()

virtual void MoreMountains.CorgiEngine.Weapon.InitiateReloadWeapon ( )
virtual

◆ Interrupt()

virtual void MoreMountains.CorgiEngine.Weapon.Interrupt ( )
virtual

Call this method to interrupt the weapon.

◆ LateUpdate()

virtual void MoreMountains.CorgiEngine.Weapon.LateUpdate ( )
protectedvirtual

On LateUpdate, processes the weapon state.

Reimplemented in MoreMountains.CorgiEngine.ProjectileWeapon.

◆ OnDisable()

virtual void MoreMountains.CorgiEngine.Weapon.OnDisable ( )
protectedvirtual

◆ PreventMovement()

virtual void MoreMountains.CorgiEngine.Weapon.PreventMovement ( )
protectedvirtual

Handles movement prevention in air or on ground.

◆ ProcessWeaponState()

virtual void MoreMountains.CorgiEngine.Weapon.ProcessWeaponState ( )
protectedvirtual

Called every lastUpdate, processes the weapon's state machine.

◆ ReloadNeeded()

virtual void MoreMountains.CorgiEngine.Weapon.ReloadNeeded ( )
protectedvirtual

Describes what happens when the weapon needs a reload.

◆ ReloadWeapon()

virtual void MoreMountains.CorgiEngine.Weapon.ReloadWeapon ( )
protectedvirtual

Reloads the weapon.

Parameters
ammoAmmo.

◆ ResetAnimatorParameters() [1/2]

virtual void MoreMountains.CorgiEngine.Weapon.ResetAnimatorParameters ( )
virtual

◆ ResetAnimatorParameters() [2/2]

virtual void MoreMountains.CorgiEngine.Weapon.ResetAnimatorParameters ( Animator animator,
HashSet< int > list )
protectedvirtual

◆ ResetComboAnimatorParameter()

virtual void MoreMountains.CorgiEngine.Weapon.ResetComboAnimatorParameter ( )
virtual

◆ ResetCooldown()

virtual void MoreMountains.CorgiEngine.Weapon.ResetCooldown ( )
virtual

Lets you reset the cooldown of the weapon.

◆ ResetMovementMultiplier()

virtual void MoreMountains.CorgiEngine.Weapon.ResetMovementMultiplier ( )
protectedvirtual

◆ RestoreMovement()

virtual void MoreMountains.CorgiEngine.Weapon.RestoreMovement ( )
protectedvirtual

◆ SetCooldownStartAt()

virtual void MoreMountains.CorgiEngine.Weapon.SetCooldownStartAt ( )
virtual

◆ SetOwner()

virtual void MoreMountains.CorgiEngine.Weapon.SetOwner ( Character newOwner,
CharacterHandleWeapon handleWeapon )
virtual

Sets the weapon's owner.

Parameters
newOwnerNew owner.

◆ ShootRequest()

virtual void MoreMountains.CorgiEngine.Weapon.ShootRequest ( )
protectedvirtual

Determines whether or not the weapon can fire.

◆ ShootRequestCo()

virtual IEnumerator MoreMountains.CorgiEngine.Weapon.ShootRequestCo ( )
virtual

Determines whether or not the weapon can fire.

◆ Start()

virtual void MoreMountains.CorgiEngine.Weapon.Start ( )
protectedvirtual

◆ TriggerWeaponOnHitDamageableFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponOnHitDamageableFeedback ( )
protectedvirtual

Plays a feedback when the weapon hits a damageable.

◆ TriggerWeaponOnHitFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponOnHitFeedback ( )
protectedvirtual

Plays a feedback when the weapon hits something.

◆ TriggerWeaponOnHitNonDamageableFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponOnHitNonDamageableFeedback ( )
protectedvirtual

Plays a feedback when the weapon hits a non damageable.

◆ TriggerWeaponOnKillFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponOnKillFeedback ( )
protectedvirtual

Plays a feedback when the weapon kills something.

◆ TriggerWeaponOnMissFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponOnMissFeedback ( )
protectedvirtual

Plays a feedback when the weapon doesn't hit something.

◆ TriggerWeaponReloadFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponReloadFeedback ( )
protectedvirtual

Plays the weapon's reload sound.

◆ TriggerWeaponReloadNeededFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponReloadNeededFeedback ( )
protectedvirtual

Plays the weapon's reload needed sound.

◆ TriggerWeaponStartFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponStartFeedback ( )
protectedvirtual

Plays the weapon's start sound.

◆ TriggerWeaponStopFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponStopFeedback ( )
protectedvirtual

Plays the weapon's stop sound.

◆ TriggerWeaponUsedFeedback()

virtual void MoreMountains.CorgiEngine.Weapon.TriggerWeaponUsedFeedback ( )
protectedvirtual

Plays the weapon's used sound.

◆ TurnWeaponOff()

virtual void MoreMountains.CorgiEngine.Weapon.TurnWeaponOff ( )
virtual

Turns the weapon off.

Reimplemented in MoreMountains.CorgiEngine.MeleeWeapon.

◆ TurnWeaponOn()

virtual void MoreMountains.CorgiEngine.Weapon.TurnWeaponOn ( )
virtual

Describes what happens when the weapon starts.

Reimplemented in MoreMountains.CorgiEngine.ChargeWeapon.

◆ Update()

virtual void MoreMountains.CorgiEngine.Weapon.Update ( )
protectedvirtual

On Update, we check if the weapon is or should be used.

Reimplemented in MoreMountains.CorgiEngine.ChargeWeapon.

◆ UpdateAnimator() [1/2]

virtual void MoreMountains.CorgiEngine.Weapon.UpdateAnimator ( )
virtual

Override this to send parameters to the character's animator. This is called once per cycle, by the Character class, after Early, normal and Late process().

◆ UpdateAnimator() [2/2]

virtual void MoreMountains.CorgiEngine.Weapon.UpdateAnimator ( Animator animator,
HashSet< int > list )
protectedvirtual

◆ WeaponDestruction()

virtual IEnumerator MoreMountains.CorgiEngine.Weapon.WeaponDestruction ( )
virtual

Destroys the weapon.

Returns
The destruction.

◆ WeaponHit()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponHit ( )
virtual

◆ WeaponHitDamageable()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponHitDamageable ( )
virtual

◆ WeaponHitNonDamageable()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponHitNonDamageable ( )
virtual

◆ WeaponInCooldown()

virtual bool MoreMountains.CorgiEngine.Weapon.WeaponInCooldown ( )
virtual

◆ WeaponInputReleased()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponInputReleased ( )
virtual

Describes what happens when the weapon's input gets released.

Reimplemented in MoreMountains.CorgiEngine.ChargeWeapon.

◆ WeaponInputStart()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponInputStart ( )
virtual

Called by input, turns the weapon on.

◆ WeaponInputStop()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponInputStop ( )
virtual

Called by input, turns the weapon off if in auto mode.

◆ WeaponKill()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponKill ( )
virtual

◆ WeaponMiss()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponMiss ( )
virtual

◆ WeaponUse()

virtual void MoreMountains.CorgiEngine.Weapon.WeaponUse ( )
protectedvirtual

When the weapon is used, plays the corresponding sound.

Reimplemented in MoreMountains.CorgiEngine.HitscanWeapon, MoreMountains.CorgiEngine.MeleeWeapon, and MoreMountains.CorgiEngine.ProjectileWeapon.

Member Data Documentation

◆ _aimableWeapon

WeaponAim MoreMountains.CorgiEngine.Weapon._aimableWeapon
protected

◆ _aliveAnimationParameter

int MoreMountains.CorgiEngine.Weapon._aliveAnimationParameter
protected

◆ _aliveAnimationParameterName

const string MoreMountains.CorgiEngine.Weapon._aliveAnimationParameterName = "Alive"
staticprotected

◆ _animatorParameters

List<HashSet<int> > MoreMountains.CorgiEngine.Weapon._animatorParameters
protected

◆ _applyForceWhileInUse

bool MoreMountains.CorgiEngine.Weapon._applyForceWhileInUse = false
protected

◆ _canFlipBeforeUse

bool MoreMountains.CorgiEngine.Weapon._canFlipBeforeUse = true
protected

◆ _characterGravity

CharacterGravity MoreMountains.CorgiEngine.Weapon._characterGravity
protected

◆ _characterHorizontalMovement

CharacterHorizontalMovement MoreMountains.CorgiEngine.Weapon._characterHorizontalMovement
protected

◆ _characterHorizontalMovementNotNull

bool MoreMountains.CorgiEngine.Weapon._characterHorizontalMovementNotNull = false
protected

◆ _comboInProgressAnimationParameter

int MoreMountains.CorgiEngine.Weapon._comboInProgressAnimationParameter
protected

◆ _comboWeapon

ComboWeapon MoreMountains.CorgiEngine.Weapon._comboWeapon
protected

◆ _controller

CorgiController MoreMountains.CorgiEngine.Weapon._controller
protected

◆ _controllerNotNull

bool MoreMountains.CorgiEngine.Weapon._controllerNotNull = false
protected

◆ _cooldownStartAt

float MoreMountains.CorgiEngine.Weapon._cooldownStartAt = float.NegativeInfinity
protected

◆ _delayBeforeUseAnimationParameter

int MoreMountains.CorgiEngine.Weapon._delayBeforeUseAnimationParameter
protected

◆ _delayBeforeUseCounter

float MoreMountains.CorgiEngine.Weapon._delayBeforeUseCounter = 0f
protected

◆ _delayBetweenUsesAnimationParameter

int MoreMountains.CorgiEngine.Weapon._delayBetweenUsesAnimationParameter
protected

◆ _delayBetweenUsesCounter

float MoreMountains.CorgiEngine.Weapon._delayBetweenUsesCounter = 0f
protected

◆ _equippedAnimationParameter

int MoreMountains.CorgiEngine.Weapon._equippedAnimationParameter
protected

◆ _forceWhileInUse

Vector2 MoreMountains.CorgiEngine.Weapon._forceWhileInUse
protected

◆ _gravityBeforeUse

bool MoreMountains.CorgiEngine.Weapon._gravityBeforeUse = true
protected

◆ _idleAnimationParameter

int MoreMountains.CorgiEngine.Weapon._idleAnimationParameter
protected

◆ _inCooldownAnimationParameter

int MoreMountains.CorgiEngine.Weapon._inCooldownAnimationParameter
protected

◆ _initialized

bool MoreMountains.CorgiEngine.Weapon._initialized = false
protected

◆ _lastTurnWeaponOnAt

float MoreMountains.CorgiEngine.Weapon._lastTurnWeaponOnAt = -float.MaxValue
protected

◆ _movementMultiplierNeedsResetting

bool MoreMountains.CorgiEngine.Weapon._movementMultiplierNeedsResetting = false
protected

◆ _movementMultiplierStorage

float MoreMountains.CorgiEngine.Weapon._movementMultiplierStorage = 1f
protected

◆ _newHandleAngles

Vector3 MoreMountains.CorgiEngine.Weapon._newHandleAngles
protected

◆ _ownerAnimator

Animator MoreMountains.CorgiEngine.Weapon._ownerAnimator
protected

◆ _ownerAnimatorParameters

HashSet<int> MoreMountains.CorgiEngine.Weapon._ownerAnimatorParameters
protected

◆ _permanentMovementMultiplierStorage

float MoreMountains.CorgiEngine.Weapon._permanentMovementMultiplierStorage = 1f
protected

◆ _recoilDirection

Vector2 MoreMountains.CorgiEngine.Weapon._recoilDirection
protected

◆ _reloadAnimationParameter

int MoreMountains.CorgiEngine.Weapon._reloadAnimationParameter
protected

◆ _reloading

bool MoreMountains.CorgiEngine.Weapon._reloading = false
protected

◆ _reloadingCounter

float MoreMountains.CorgiEngine.Weapon._reloadingCounter = 0f
protected

◆ _reloadStartAnimationParameter

int MoreMountains.CorgiEngine.Weapon._reloadStartAnimationParameter
protected

◆ _reloadStopAnimationParameter

int MoreMountains.CorgiEngine.Weapon._reloadStopAnimationParameter
protected

◆ _singleUseAnimationParameter

int MoreMountains.CorgiEngine.Weapon._singleUseAnimationParameter
protected

◆ _spriteRenderer

SpriteRenderer MoreMountains.CorgiEngine.Weapon._spriteRenderer
protected

◆ _startAnimationParameter

int MoreMountains.CorgiEngine.Weapon._startAnimationParameter
protected

◆ _stopAnimationParameter

int MoreMountains.CorgiEngine.Weapon._stopAnimationParameter
protected

◆ _triggerReleased

bool MoreMountains.CorgiEngine.Weapon._triggerReleased = false
protected

◆ _useAnimationParameter

int MoreMountains.CorgiEngine.Weapon._useAnimationParameter
protected

◆ _weaponAngleAnimationParameter

int MoreMountains.CorgiEngine.Weapon._weaponAngleAnimationParameter
protected

◆ _weaponAngleRelativeAnimationParameter

int MoreMountains.CorgiEngine.Weapon._weaponAngleRelativeAnimationParameter
protected

◆ _weaponAttachment

Transform MoreMountains.CorgiEngine.Weapon._weaponAttachment
protected

◆ _weaponAttachmentOffset

Vector3 MoreMountains.CorgiEngine.Weapon._weaponAttachmentOffset
protected

◆ _weaponOffset

Vector3 MoreMountains.CorgiEngine.Weapon._weaponOffset
protected

◆ AlwaysResetMultiplierToInitial

bool MoreMountains.CorgiEngine.Weapon.AlwaysResetMultiplierToInitial = true

if this is true, movement will always be reset to initial speed after a multiplier stops being applied

◆ AmmoConsumedPerShot

int MoreMountains.CorgiEngine.Weapon.AmmoConsumedPerShot = 1

the amount of ammo consumed everytime the weapon fires

◆ Animators

List<Animator> MoreMountains.CorgiEngine.Weapon.Animators

the other animators (other than the Character's) that you want to update every time this weapon gets used

◆ ApplyRecoilOnHitDamageable

bool MoreMountains.CorgiEngine.Weapon.ApplyRecoilOnHitDamageable = false

Whether or not to apply recoil to the Weapon owner every time this weapon hits a damageable object (an object with a Health component, basically)

◆ ApplyRecoilOnHitNonDamageable

bool MoreMountains.CorgiEngine.Weapon.ApplyRecoilOnHitNonDamageable = false

Whether or not to apply recoil to the Weapon owner every time this weapon hits a non damageable object (a platform, prop, etc)

◆ ApplyRecoilOnKill

bool MoreMountains.CorgiEngine.Weapon.ApplyRecoilOnKill = false

Whether or not to apply recoil to the Weapon owner every time the weapon kills its target.

◆ ApplyRecoilOnMiss

bool MoreMountains.CorgiEngine.Weapon.ApplyRecoilOnMiss = false

Whether or not to apply recoil to the Weapon owner every time the weapon misses its hit.

◆ ApplyRecoilOnUse

bool MoreMountains.CorgiEngine.Weapon.ApplyRecoilOnUse = false

Whether or not to apply recoil to the Weapon owner every time this weapon gets used, regardless of the outcome.

◆ AutoDestroyWhenEmpty

bool MoreMountains.CorgiEngine.Weapon.AutoDestroyWhenEmpty

if this is set to true, the weapon will auto destroy when there's no ammo left

◆ AutoDestroyWhenEmptyDelay

float MoreMountains.CorgiEngine.Weapon.AutoDestroyWhenEmptyDelay = 1f

the delay (in seconds) before weapon destruction if empty

◆ AutoReload

bool MoreMountains.CorgiEngine.Weapon.AutoReload

if this is true, pressing the fire button when a reload is needed will reload the weapon. Otherwise you'll need to press the reload button

◆ BurstLength

int MoreMountains.CorgiEngine.Weapon.BurstLength = 3

the amount of 'shots' in a burst sequence

◆ BurstTimeBetweenShots

float MoreMountains.CorgiEngine.Weapon.BurstTimeBetweenShots = 0.1f

the time between shots in a burst sequence (in seconds)

◆ CooldownDuration

float MoreMountains.CorgiEngine.Weapon.CooldownDuration = 0f

a duration, in seconds, at the end of the weapon's life cycle and before going back to Idle

◆ CurrentAmmoLoaded

int MoreMountains.CorgiEngine.Weapon.CurrentAmmoLoaded = 0

the current amount of ammo loaded inside the weapon

◆ DelayBeforeUse

float MoreMountains.CorgiEngine.Weapon.DelayBeforeUse = 0f

the delay before use, that will be applied for every shot

◆ DelayBeforeUseAnimationParameter

string MoreMountains.CorgiEngine.Weapon.DelayBeforeUseAnimationParameter

the name of the weapon's delay before use animation parameter : true when the weapon has been activated but hasn't been used yet

◆ DelayBeforeUseReleaseInterruption

bool MoreMountains.CorgiEngine.Weapon.DelayBeforeUseReleaseInterruption = true

whether or not the delay before used can be interrupted by releasing the shoot button (if true, releasing the button will cancel the delayed shot)

◆ DelayBetweenUsesAnimationParameter

string MoreMountains.CorgiEngine.Weapon.DelayBetweenUsesAnimationParameter

the name of the weapon's delay between each use animation parameter : true when the weapon is in use

◆ DisableGravityWhileInUse

bool MoreMountains.CorgiEngine.Weapon.DisableGravityWhileInUse = false

whether or not to disable gravity while the weapon is in use

◆ EquippedAnimationParameter

string MoreMountains.CorgiEngine.Weapon.EquippedAnimationParameter

the name of the parameter to send to true as long as this weapon is equipped, used or not. While all the other parameters defined here are updated by the Weapon class itself, and passed to the weapon and character, this one will be updated by CharacterHandleWeapon only.

◆ FlipValue

Vector3 MoreMountains.CorgiEngine.Weapon.FlipValue = new Vector3(-1,1,1)

the FlipValue will be used to multiply the model's transform's localscale on flip. Usually it's -1,1,1, but feel free to change it to suit your model's specs

◆ FlipWeaponOnCharacterFlip

bool MoreMountains.CorgiEngine.Weapon.FlipWeaponOnCharacterFlip = true

should that weapon be flipped when the character flips ?

◆ ForceWhileInUse

Vector2 MoreMountains.CorgiEngine.Weapon.ForceWhileInUse = Vector2.zero

the force to apply when the weapon is in use, if SetForceWhileInUse is true

◆ IdleAnimationParameter

string MoreMountains.CorgiEngine.Weapon.IdleAnimationParameter

the name of the weapon's idle animation parameter : this will be true all the time except when the weapon is being used

◆ InCooldownAnimationParameter

string MoreMountains.CorgiEngine.Weapon.InCooldownAnimationParameter

the name of the weapon's in cooldown animation parameter : true when the weapon is in cooldown

◆ InitializeOnStart

bool MoreMountains.CorgiEngine.Weapon.InitializeOnStart = false

If this is true, the weapon will initialize itself on start, otherwise it'll have to be init manually, usually by the CharacterHandleWeapon class.

◆ Interruptable

bool MoreMountains.CorgiEngine.Weapon.Interruptable = false

whether or not this weapon can be interrupted

◆ LeftHandHandle

Transform MoreMountains.CorgiEngine.Weapon.LeftHandHandle

the transform to which the character's left hand should be attached to

◆ MagazineBased

bool MoreMountains.CorgiEngine.Weapon.MagazineBased = false

whether or not the weapon is magazine based. If it's not, it'll just take its ammo inside a global pool

◆ MagazineSize

int MoreMountains.CorgiEngine.Weapon.MagazineSize = 30

the size of the magazine

◆ MirrorCharacterAnimatorParameters

bool MoreMountains.CorgiEngine.Weapon.MirrorCharacterAnimatorParameters = false

if this is true, the weapon's animator(s) will mirror the animation parameter of the owner character (that way your weapon's animator will be able to "know" if the character is walking, jumping, etc)

◆ ModifyMovementWhileAttacking

bool MoreMountains.CorgiEngine.Weapon.ModifyMovementWhileAttacking = false

if this is true, a multiplier will be applied to movement while the weapon is active

◆ ModifyMovementWhileEquipped

bool MoreMountains.CorgiEngine.Weapon.ModifyMovementWhileEquipped = false

if this is true, a multiplier will be applied to movement while the weapon is equipped

◆ MovementMultiplier

float MoreMountains.CorgiEngine.Weapon.MovementMultiplier = 0f

the multiplier to apply to movement while attacking

◆ PermanentMovementMultiplier

float MoreMountains.CorgiEngine.Weapon.PermanentMovementMultiplier = 0f

the multiplier to apply to movement while equipped

◆ PreventFlipWhileInUse

bool MoreMountains.CorgiEngine.Weapon.PreventFlipWhileInUse = false

whether or not to disable flip while the weapon is in use

◆ PreventHorizontalAirMovementWhileInUse

bool MoreMountains.CorgiEngine.Weapon.PreventHorizontalAirMovementWhileInUse = false

if this is true all horizontal air movement will be prevented (even flip) while the weapon is active

◆ PreventHorizontalGroundMovementWhileInUse

bool MoreMountains.CorgiEngine.Weapon.PreventHorizontalGroundMovementWhileInUse = false

if this is true all movement will be prevented (even flip) while the weapon is active

◆ RecoilOnHitDamageableProperties

WeaponRecoilProperties MoreMountains.CorgiEngine.Weapon.RecoilOnHitDamageableProperties

the recoil to apply when this weapon hits a damageable

◆ RecoilOnHitNonDamageableProperties

WeaponRecoilProperties MoreMountains.CorgiEngine.Weapon.RecoilOnHitNonDamageableProperties

the recoil to apply when this weapon hits a non damageable

◆ RecoilOnKillProperties

WeaponRecoilProperties MoreMountains.CorgiEngine.Weapon.RecoilOnKillProperties

The recoil to apply on kill.

◆ RecoilOnMissProperties

WeaponRecoilProperties MoreMountains.CorgiEngine.Weapon.RecoilOnMissProperties

the recoil to apply when this weapon hits nothing

◆ RecoilOnUseProperties

WeaponRecoilProperties MoreMountains.CorgiEngine.Weapon.RecoilOnUseProperties

The recoil to apply every time this weapon gets used.

◆ ReloadAnimationParameter

string MoreMountains.CorgiEngine.Weapon.ReloadAnimationParameter

the name of the weapon reload animation parameter

◆ ReloadStartAnimationParameter

string MoreMountains.CorgiEngine.Weapon.ReloadStartAnimationParameter

the name of the weapon reload start animation parameter

◆ ReloadStopAnimationParameter

string MoreMountains.CorgiEngine.Weapon.ReloadStopAnimationParameter

the name of the weapon reload end animation parameter

◆ ReloadTime

float MoreMountains.CorgiEngine.Weapon.ReloadTime = 2f

the time it takes to reload the weapon

◆ RightHandHandle

Transform MoreMountains.CorgiEngine.Weapon.RightHandHandle

the transform to which the character's right hand should be attached to

◆ SetForceWhileInUse

bool MoreMountains.CorgiEngine.Weapon.SetForceWhileInUse = false

whether or not to apply a force when the weapon is in use

◆ SingleUseAnimationParameter

string MoreMountains.CorgiEngine.Weapon.SingleUseAnimationParameter

the name of the weapon's single use animation parameter : true at each frame the weapon activates (shoots)

◆ StartAnimationParameter

string MoreMountains.CorgiEngine.Weapon.StartAnimationParameter

the name of the weapon's start animation parameter : true at the frame where the weapon starts being used

◆ StopAnimationParameter

string MoreMountains.CorgiEngine.Weapon.StopAnimationParameter

the name of the weapon stop animation parameter : true after a shot and before the next one or the weapon's stop

◆ TimeBetweenUses

float MoreMountains.CorgiEngine.Weapon.TimeBetweenUses = 1f

the time (in seconds) between two shots

◆ TimeBetweenUsesReleaseInterruption

bool MoreMountains.CorgiEngine.Weapon.TimeBetweenUsesReleaseInterruption = true

whether or not the time between uses can be interrupted by releasing the shoot button (if true, releasing the button will cancel the time between uses)

◆ TriggerMode

TriggerModes MoreMountains.CorgiEngine.Weapon.TriggerMode = TriggerModes.Auto

is this weapon on semi or full auto ?

◆ UseAnimationParameter

string MoreMountains.CorgiEngine.Weapon.UseAnimationParameter

the name of the weapon's in use animation parameter : true at each frame the weapon has started firing but hasn't stopped yet

◆ UseBurstMode

bool MoreMountains.CorgiEngine.Weapon.UseBurstMode = false

if this is true, the weapon will activate repeatedly for every shoot request

◆ WeaponAngleAnimationParameter

string MoreMountains.CorgiEngine.Weapon.WeaponAngleAnimationParameter

the name of the weapon's angle animation parameter

◆ WeaponAngleRelativeAnimationParameter

string MoreMountains.CorgiEngine.Weapon.WeaponAngleRelativeAnimationParameter

the name of the weapon's angle animation parameter, adjusted so it's always relative to the direction the character is currently facing

◆ WeaponAttachmentOffset

Vector3 MoreMountains.CorgiEngine.Weapon.WeaponAttachmentOffset = Vector3.zero

an offset that will be applied to the weapon once attached to the center of the WeaponAttachment transform.

◆ WeaponOnHitDamageableFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponOnHitDamageableFeedback

A MMFeedback to play when the weapon hits a damageable.

◆ WeaponOnHitFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponOnHitFeedback

A MMFeedback to play when the weapon hits anything (damageable or not)

◆ WeaponOnHitNonDamageableFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponOnHitNonDamageableFeedback

A MMFeedback to play when the weapon hits a non damageable object.

◆ WeaponOnKillFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponOnKillFeedback

A MMFeedback to play when the weapon kills something.

◆ WeaponOnMissFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponOnMissFeedback

A MMFeedback to play when the weapon misses (what constitutes a miss is defined per Weapon subclass)

◆ WeaponReloadMMFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponReloadMMFeedback

the feedback to play when the weapon gets reloaded

◆ WeaponReloadNeededMMFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponReloadNeededMMFeedback

the feedback to play when the weapon gets reloaded

◆ WeaponStartMMFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponStartMMFeedback

the feedback to play when the weapon starts being used

◆ WeaponState

MMStateMachine<WeaponStates> MoreMountains.CorgiEngine.Weapon.WeaponState

the weapon's state machine

◆ WeaponStopMMFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponStopMMFeedback

the feedback to play when the weapon stops being used

◆ WeaponUsedMMFeedback

MMFeedbacks MoreMountains.CorgiEngine.Weapon.WeaponUsedMMFeedback

the feedback to play while the weapon is in use

Property Documentation

◆ CharacterHandleWeapon

CharacterHandleWeapon MoreMountains.CorgiEngine.Weapon.CharacterHandleWeapon
getset

the weapon's owner's CharacterHandleWeapon component

◆ Flipped

bool MoreMountains.CorgiEngine.Weapon.Flipped
getset

if true, the weapon is flipped

◆ Owner

Character MoreMountains.CorgiEngine.Weapon.Owner
getprotected set

the weapon's owner

◆ WeaponAmmo

WeaponAmmo MoreMountains.CorgiEngine.Weapon.WeaponAmmo
getprotected set

the WeaponAmmo component optionnally associated to this weapon

◆ WeaponID

string MoreMountains.CorgiEngine.Weapon.WeaponID
getset

the name of the inventory item corresponding to this weapon. Automatically set (if needed) by InventoryEngineWeapon


The documentation for this class was generated from the following file:
  • Assets/CorgiEngine/Common/Scripts/Agents/Weapons/Weapon.cs