PlayerDungeonController Class

MyDungeon

PlayerDungeonController Class

Base class for controller for the Player in the Dungeon scenes
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          MyDungeon.EntitiesMovingDungeonObject
            MyDungeon.EntitiesPlayerDungeon
              MyDungeon.ControllersPlayerDungeonController

Namespace:  MyDungeon.Controllers
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public abstract class PlayerDungeonController : PlayerDungeon

The PlayerDungeonController type exposes the following members.

Constructors
  NameDescription
Protected methodPlayerDungeonController
Initializes a new instance of the PlayerDungeonController class
Top
Methods
  NameDescription
Protected methodAttack
Protected methodAttemptMove
Attempts to move the player and ends the player's turn if they moved
(Overrides PlayerDungeonAttemptMove(Int32, Int32).)
Protected methodCheckHit
Checks if entity is blocked by an object on the blocking layer in a desired direction
(Inherited from MovingDungeonObject.)
Protected methodCheckIfGameOver
Check if player is out of HP and if so disable the PlayerDungeonController
Public methodLoseHealth
Reduce player's current health and executes UpdateHealth
(Overrides MovingDungeonObjectLoseHealth(Int32).)
Protected methodMove
Checks if the entity can move in the provided direction
(Inherited from MovingDungeonObject.)
Public methodRecoverHealth
Increase player's current health and executes UpdateHealth
(Overrides MovingDungeonObjectRecoverHealth(Int32).)
Protected methodSmoothMovement
Moves entity from their current position to their desired position with a smooth animation
(Inherited from MovingDungeonObject.)
Protected methodStart
Sets the player's current health
(Overrides MovingDungeonObjectStart.)
Protected methodUpdateHealth
Ensure health does not go above MaxHealth or below 0 then executes CheckIfGameOver
Protected methodWaitForTurnEnd
Used to ensure a turn does not end early
(Inherited from MovingDungeonObject.)
Top
Fields
  NameDescription
Public fieldBlockingLayer
Layer used for collision checking in dungeons
(Inherited from MovingDungeonObject.)
Protected fieldBoxCollider (Inherited from MovingDungeonObject.)
Protected fieldCurHealth
Entity's current health
(Inherited from MovingDungeonObject.)
Public fieldDisplayName
Name of the entity
(Inherited from MovingDungeonObject.)
Protected fieldInverseMoveTime
Inverse of MoveTime used for SmoothMovement
(Inherited from MovingDungeonObject.)
Public fieldMaxHealth
Entity's maximum HP value
(Inherited from MovingDungeonObject.)
Public fieldMoveTime
How long the entity's turn lasts
(Inherited from MovingDungeonObject.)
Protected fieldMoving
Entity's current moving state
(Inherited from MovingDungeonObject.)
Protected fieldPosX
Entity's current X position
(Inherited from MovingDungeonObject.)
Protected fieldPosY
Entity's current Y position
(Inherited from MovingDungeonObject.)
Protected fieldRb2D (Inherited from MovingDungeonObject.)
Public fieldStrength
Base damage value attacks will do
(Inherited from MovingDungeonObject.)
Top
Extension Methods
  NameDescription
Public Extension MethodInvoke
Invoke using a delegate
(Defined by MonoBehaviourExtensions.)
Top
See Also