Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Player
- PlayerModelManager
- PlayerPickUpObjectEvent
- PlayerSetFarmAnswerEvent
- PlayerSetFarmEvent
- PlayerSetHandToolEvent
- PlayerStateActivateObject
- PlayerStateAnimalFeed
- PlayerStateAnimalInteract
- PlayerStateAnimalPet
- PlayerStateAnimalRide
- PlayerStateBase
- PlayerStateCrouch
- PlayerStateCycleHandtool
- PlayerStateDrop
- PlayerStateFall
- PlayerStateIdle
- PlayerStateJump
- PlayerStateMachine
- PlayerStatePickup
- PlayerStateRun
- PlayerStateSwim
- PlayerStateThrow
- PlayerStateUseLight
- PlayerStateWalk
- PlayerStyle
- PlayerSwitchedFarmEvent
- PlayerTeleportEvent
- PlayerThrowObjectEvent
- PlayerToggleLightEvent
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
PlayerStateBase
Functionsactivate
DescriptionActivate methodDefinition
activate()Code
46 | function PlayerStateBase:activate() |
47 | self.isActive = true |
48 | end |
deactivate
DescriptionDeactivate methodDefinition
deactivate()Code
52 | function PlayerStateBase:deactivate() |
53 | self.isActive = false |
54 | end |
debugDraw
DescriptionDefinitiondebugDraw()Code
74 | function PlayerStateBase:debugDraw(dt) |
75 | end |
delete
DescriptionLoad methodDefinition
delete()Code
36 | function PlayerStateBase:delete() |
37 | end |
getStateMachine
DescriptionGet managerDefinition
getStateMachine()Code
79 | function PlayerStateBase:getStateMachine() |
80 | return self.stateMachine |
81 | end |
inDebugMode
DescriptionCheck if we are in debug modeDefinition
inDebugMode()Code
68 | function PlayerStateBase:inDebugMode() |
69 | return self.isInDebugMode |
70 | end |
load
DescriptionLoad methodDefinition
load()Code
41 | function PlayerStateBase:load() |
42 | end |
new
DescriptionCreating instance of player state.Definition
new(table player, table stateMachine, table custom_mt)Arguments
table | player | instance of player |
table | stateMachine | instance of the state machine manager |
table | custom_mt | meta table |
table | instance | instance of object |
20 | function PlayerStateBase:new(player, stateMachine, custom_mt) |
21 | if custom_mt == nil then |
22 | custom_mt = PlayerStateBase_mt |
23 | end |
24 | local self = setmetatable({}, custom_mt) |
25 | |
26 | self.isActive = false |
27 | self.isInDebugMode = false |
28 | self.player = player |
29 | self.stateMachine = stateMachine |
30 | |
31 | return self |
32 | end |
toggleDebugMode
DescriptionToggle debug modeDefinition
toggleDebugMode()Code
58 | function PlayerStateBase:toggleDebugMode() |
59 | if self.isInDebugMode then |
60 | self.isInDebugMode= false |
61 | else |
62 | self.isInDebugMode= true |
63 | end |
64 | end |
update
DescriptionUpdate methodDefinition
update(float dt)Arguments
float | dt | delta time in ms |
86 | function PlayerStateBase:update(dt) |
87 | end |
updateTick
DescriptionNetwork tick update methodDefinition
updateTick(float dt)Arguments
float | dt | delta time in ms |
92 | function PlayerStateBase:updateTick(dt) |
93 | end |