MovingDungeonObject Class

MyDungeon

MovingDungeonObject Class

Base class for objects that move in the Dungeon scenes
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          MyDungeon.EntitiesMovingDungeonObject
            MyDungeon.EntitiesCreature
            MyDungeon.EntitiesPlayerDungeon

Namespace:  MyDungeon.Entities
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public abstract class MovingDungeonObject : MonoBehaviour

The MovingDungeonObject type exposes the following members.

Constructors
  NameDescription
Protected methodMovingDungeonObject
Initializes a new instance of the MovingDungeonObject class
Top
Methods
  NameDescription
Protected methodCheckHit
Checks if entity is blocked by an object on the blocking layer in a desired direction
Public methodLoseHealth
Subtracts health from the entity
Protected methodMove
Checks if the entity can move in the provided direction
Public methodRecoverHealth
Adds health to the entity
Protected methodSmoothMovement
Moves entity from their current position to their desired position with a smooth animation
Protected methodStart
Initializes the 2DPhysics components, the entity's position, and animation movement multiplier
Protected methodWaitForTurnEnd
Used to ensure a turn does not end early
Top
Fields
  NameDescription
Public fieldBlockingLayer
Layer used for collision checking in dungeons
Protected fieldBoxCollider
Protected fieldCurHealth
Entity's current health
Public fieldDisplayName
Name of the entity
Protected fieldInverseMoveTime
Inverse of MoveTime used for SmoothMovement
Public fieldMaxHealth
Entity's maximum HP value
Public fieldMoveTime
How long the entity's turn lasts
Protected fieldMoving
Entity's current moving state
Protected fieldPosX
Entity's current X position
Protected fieldPosY
Entity's current Y position
Protected fieldRb2D
Public fieldStrength
Base damage value attacks will do
Top
Extension Methods
  NameDescription
Public Extension MethodInvoke
Invoke using a delegate
(Defined by MonoBehaviourExtensions.)
Top
See Also