Demo character controller, very basic stuff.
More...
|
| virtual void | SetMovement (float movementX, float movementY) |
| | Updates the character's movement values for this frame.
|
| virtual void | SetHorizontalMove (float value) |
| | Sets the horizontal move value.
|
| virtual void | SetVerticalMove (float value) |
| | Sets the vertical move value.
|
| virtual void | SetArmor (int index) |
| | Sets the current armor.
|
| virtual void | SetWeapon (Sprite newSprite, InventoryItem item) |
| | Sets the current weapon sprite.
|
| virtual void | OnMMEvent (MMInventoryEvent inventoryEvent) |
| | Catches MMInventoryEvents and if it's an "inventory loaded" one, equips the first armor and weapon stored in the corresponding inventories.
|
| void | OnMMEvent (T eventType) |
|
| virtual void | Start () |
| | On Start, we store the character's animator and rigidbody.
|
| virtual void | FixedUpdate () |
| | On fixed update we move the character and update its animator.
|
| virtual void | Movement () |
| | Acts on the rigidbody's velocity to move the character based on its current horizontal and vertical values.
|
| virtual void | Flip () |
| | Flips the character and its dependencies horizontally.
|
| virtual void | UpdateAnimator () |
| | Updates the animator's parameters.
|
| virtual void | OnEnable () |
| | On Enable, we start listening to MMInventoryEvents.
|
| virtual void | OnDisable () |
| | On Disable, we stop listening to MMInventoryEvents.
|
Demo character controller, very basic stuff.
◆ FixedUpdate()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.FixedUpdate |
( |
| ) |
|
|
protectedvirtual |
On fixed update we move the character and update its animator.
◆ Flip()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.Flip |
( |
| ) |
|
|
protectedvirtual |
Flips the character and its dependencies horizontally.
◆ Movement()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.Movement |
( |
| ) |
|
|
protectedvirtual |
Acts on the rigidbody's velocity to move the character based on its current horizontal and vertical values.
◆ OnDisable()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On Disable, we stop listening to MMInventoryEvents.
◆ OnEnable()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On Enable, we start listening to MMInventoryEvents.
◆ OnMMEvent()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.OnMMEvent |
( |
MMInventoryEvent | inventoryEvent | ) |
|
|
virtual |
Catches MMInventoryEvents and if it's an "inventory loaded" one, equips the first armor and weapon stored in the corresponding inventories.
- Parameters
-
◆ SetArmor()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.SetArmor |
( |
int | index | ) |
|
|
virtual |
Sets the current armor.
- Parameters
-
◆ SetHorizontalMove()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.SetHorizontalMove |
( |
float | value | ) |
|
|
virtual |
Sets the horizontal move value.
- Parameters
-
◆ SetMovement()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.SetMovement |
( |
float | movementX, |
|
|
float | movementY ) |
|
virtual |
Updates the character's movement values for this frame.
- Parameters
-
| movementX | Movement x. |
| movementY | Movement y. |
◆ SetVerticalMove()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.SetVerticalMove |
( |
float | value | ) |
|
|
virtual |
Sets the vertical move value.
- Parameters
-
◆ SetWeapon()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.SetWeapon |
( |
Sprite | newSprite, |
|
|
InventoryItem | item ) |
|
virtual |
Sets the current weapon sprite.
- Parameters
-
| newSprite | New sprite. |
| item | Item. |
◆ Start()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.Start |
( |
| ) |
|
|
protectedvirtual |
On Start, we store the character's animator and rigidbody.
◆ UpdateAnimator()
| virtual void MoreMountains.InventoryEngine.InventoryDemoCharacter.UpdateAnimator |
( |
| ) |
|
|
protectedvirtual |
Updates the animator's parameters.
◆ _animator
| Animator MoreMountains.InventoryEngine.InventoryDemoCharacter._animator |
|
protected |
◆ _currentArmor
| int MoreMountains.InventoryEngine.InventoryDemoCharacter._currentArmor =0 |
|
protected |
◆ _currentWeapon
| int MoreMountains.InventoryEngine.InventoryDemoCharacter._currentWeapon =0 |
|
protected |
◆ _horizontalMove
| float MoreMountains.InventoryEngine.InventoryDemoCharacter._horizontalMove = 0f |
|
protected |
◆ _isFacingRight
| bool MoreMountains.InventoryEngine.InventoryDemoCharacter._isFacingRight = true |
|
protected |
◆ _movement
| Vector2 MoreMountains.InventoryEngine.InventoryDemoCharacter._movement |
|
protected |
◆ _rigidBody2D
| Rigidbody2D MoreMountains.InventoryEngine.InventoryDemoCharacter._rigidBody2D |
|
protected |
◆ _verticalMove
| float MoreMountains.InventoryEngine.InventoryDemoCharacter._verticalMove = 0f |
|
protected |
◆ ArmorInventory
| Inventory MoreMountains.InventoryEngine.InventoryDemoCharacter.ArmorInventory |
◆ CharacterSpeed
| float MoreMountains.InventoryEngine.InventoryDemoCharacter.CharacterSpeed = 300f |
◆ PlayerID
| string MoreMountains.InventoryEngine.InventoryDemoCharacter.PlayerID = "Player1" |
◆ WeaponInventory
| Inventory MoreMountains.InventoryEngine.InventoryDemoCharacter.WeaponInventory |
◆ WeaponSprite
| SpriteRenderer MoreMountains.InventoryEngine.InventoryDemoCharacter.WeaponSprite |
the sprite used to show the current weapon
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/Demos/PixelRogue/Scripts/InventoryDemoCharacter.cs