TopDown Engine  v4.1
MoreMountains.TopDownEngine.WeaponModel Class Reference

A class used to force a model to aim at a Weapon's target More...

Inheritance diagram for MoreMountains.TopDownEngine.WeaponModel:
MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Member Functions

virtual void Show (CharacterHandleWeapon handleWeapon)
 
virtual void Hide ()
 

Public Attributes

string WeaponID = "WeaponID"
 a unique ID that will be used to hide / show this model when the corresponding weapon gets equipped More...
 
GameObject TargetModel
 a GameObject to show/hide for this model, usually nested right below the logic level of the WeaponModel More...
 
bool AimWeaponModelAtTarget = true
 if this is true, the model will aim at the parent weapon's target More...
 
bool LockVerticalRotation = true
 if this is true, the model's aim will be vertically locked (no up/down aiming) More...
 
bool AddAnimator = false
 whether or not to add the target animator to the real weapon's animator list More...
 
Animator TargetAnimator
 the animator to send weapon animation parameters to More...
 
bool OverrideWeaponUseTransform = false
 whether or not to override the weapon use transform More...
 
Transform WeaponUseTransform
 a transform to use as the spawn point for weapon use (if null, only offset will be considered, otherwise the transform without offset) More...
 
bool UseIK = false
 whether or not to use IK with this model More...
 
Transform LeftHandHandle
 the transform to which the character's left hand should be attached to More...
 
Transform RightHandHandle
 the transform to which the character's right hand should be attached to More...
 
bool BindFeedbacks = true
 if this is true, the model's feedbacks will replace the original weapon's feedbacks More...
 
MMFeedbacks WeaponStartMMFeedback
 the feedback to play when the weapon starts being used More...
 
MMFeedbacks WeaponUsedMMFeedback
 the feedback to play while the weapon is in use More...
 
MMFeedbacks WeaponStopMMFeedback
 the feedback to play when the weapon stops being used More...
 
MMFeedbacks WeaponReloadMMFeedback
 the feedback to play when the weapon gets reloaded More...
 
MMFeedbacks WeaponReloadNeededMMFeedback
 the feedback to play when the weapon gets reloaded More...
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 On Start we grab our CharacterHandleWeapon component More...
 
virtual void Update ()
 Aims the weapon model at the target More...
 

Protected Attributes

List< CharacterHandleWeapon_handleWeapons
 
WeaponAim _weaponAim
 
Vector3 _rotationDirection
 

Properties

virtual CharacterHandleWeapon Owner [get, set]
 

Detailed Description

A class used to force a model to aim at a Weapon's target

Member Function Documentation

◆ Awake()

virtual void MoreMountains.TopDownEngine.WeaponModel.Awake ( )
protectedvirtual

◆ Hide()

virtual void MoreMountains.TopDownEngine.WeaponModel.Hide ( )
virtual

◆ Show()

virtual void MoreMountains.TopDownEngine.WeaponModel.Show ( CharacterHandleWeapon  handleWeapon)
virtual

◆ Start()

virtual void MoreMountains.TopDownEngine.WeaponModel.Start ( )
protectedvirtual

On Start we grab our CharacterHandleWeapon component

◆ Update()

virtual void MoreMountains.TopDownEngine.WeaponModel.Update ( )
protectedvirtual

Aims the weapon model at the target

Member Data Documentation

◆ _handleWeapons

List<CharacterHandleWeapon> MoreMountains.TopDownEngine.WeaponModel._handleWeapons
protected

◆ _rotationDirection

Vector3 MoreMountains.TopDownEngine.WeaponModel._rotationDirection
protected

◆ _weaponAim

WeaponAim MoreMountains.TopDownEngine.WeaponModel._weaponAim
protected

◆ AddAnimator

bool MoreMountains.TopDownEngine.WeaponModel.AddAnimator = false

whether or not to add the target animator to the real weapon's animator list

◆ AimWeaponModelAtTarget

bool MoreMountains.TopDownEngine.WeaponModel.AimWeaponModelAtTarget = true

if this is true, the model will aim at the parent weapon's target

◆ BindFeedbacks

bool MoreMountains.TopDownEngine.WeaponModel.BindFeedbacks = true

if this is true, the model's feedbacks will replace the original weapon's feedbacks

◆ LeftHandHandle

Transform MoreMountains.TopDownEngine.WeaponModel.LeftHandHandle

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

◆ LockVerticalRotation

bool MoreMountains.TopDownEngine.WeaponModel.LockVerticalRotation = true

if this is true, the model's aim will be vertically locked (no up/down aiming)

◆ OverrideWeaponUseTransform

bool MoreMountains.TopDownEngine.WeaponModel.OverrideWeaponUseTransform = false

whether or not to override the weapon use transform

◆ RightHandHandle

Transform MoreMountains.TopDownEngine.WeaponModel.RightHandHandle

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

◆ TargetAnimator

Animator MoreMountains.TopDownEngine.WeaponModel.TargetAnimator

the animator to send weapon animation parameters to

◆ TargetModel

GameObject MoreMountains.TopDownEngine.WeaponModel.TargetModel

a GameObject to show/hide for this model, usually nested right below the logic level of the WeaponModel

◆ UseIK

bool MoreMountains.TopDownEngine.WeaponModel.UseIK = false

whether or not to use IK with this model

◆ WeaponID

string MoreMountains.TopDownEngine.WeaponModel.WeaponID = "WeaponID"

a unique ID that will be used to hide / show this model when the corresponding weapon gets equipped

◆ WeaponReloadMMFeedback

MMFeedbacks MoreMountains.TopDownEngine.WeaponModel.WeaponReloadMMFeedback

the feedback to play when the weapon gets reloaded

◆ WeaponReloadNeededMMFeedback

MMFeedbacks MoreMountains.TopDownEngine.WeaponModel.WeaponReloadNeededMMFeedback

the feedback to play when the weapon gets reloaded

◆ WeaponStartMMFeedback

MMFeedbacks MoreMountains.TopDownEngine.WeaponModel.WeaponStartMMFeedback

the feedback to play when the weapon starts being used

◆ WeaponStopMMFeedback

MMFeedbacks MoreMountains.TopDownEngine.WeaponModel.WeaponStopMMFeedback

the feedback to play when the weapon stops being used

◆ WeaponUsedMMFeedback

MMFeedbacks MoreMountains.TopDownEngine.WeaponModel.WeaponUsedMMFeedback

the feedback to play while the weapon is in use

◆ WeaponUseTransform

Transform MoreMountains.TopDownEngine.WeaponModel.WeaponUseTransform

a transform to use as the spawn point for weapon use (if null, only offset will be considered, otherwise the transform without offset)

Property Documentation

◆ Owner

virtual CharacterHandleWeapon MoreMountains.TopDownEngine.WeaponModel.Owner
getset

The documentation for this class was generated from the following file: