C# Class UnityPlatformer.AIInput

Fake input for AI. Allow to manually (by code) control input/actions.\n This way a AI is exactly like a playable character and no code duplication :)
Inheritance: PlatformerInput
Mostrar archivo Open project: llafuente/unity-platformer Class Usage Examples

Public Methods

Method Description
DisableAction ( string action ) : void

Disable action

EnableAction ( string action ) : void

Enable action

GetAxisRaw ( ) : Vector2
GetAxisRawX ( ) : float
GetAxisRawY ( ) : float
IsActionDown ( string action ) : bool
IsActionHeld ( string action ) : bool
IsActionUp ( string action ) : bool
IsDownDown ( ) : bool
IsLeftDown ( ) : bool
IsRightDown ( ) : bool
IsUpDown ( ) : bool
SetAxis ( Vector2 v ) : void

Modify axis

SetX ( float x ) : void

Modify X axis

SetY ( float y ) : void

Modify Y axis

Method Details

DisableAction() public method

Disable action
public DisableAction ( string action ) : void
action string
return void

EnableAction() public method

Enable action
public EnableAction ( string action ) : void
action string
return void

GetAxisRaw() public method

public GetAxisRaw ( ) : Vector2
return Vector2

GetAxisRawX() public method

public GetAxisRawX ( ) : float
return float

GetAxisRawY() public method

public GetAxisRawY ( ) : float
return float

IsActionDown() public method

public IsActionDown ( string action ) : bool
action string
return bool

IsActionHeld() public method

public IsActionHeld ( string action ) : bool
action string
return bool

IsActionUp() public method

public IsActionUp ( string action ) : bool
action string
return bool

IsDownDown() public method

public IsDownDown ( ) : bool
return bool

IsLeftDown() public method

public IsLeftDown ( ) : bool
return bool

IsRightDown() public method

public IsRightDown ( ) : bool
return bool

IsUpDown() public method

public IsUpDown ( ) : bool
return bool

SetAxis() public method

Modify axis
public SetAxis ( Vector2 v ) : void
v Vector2
return void

SetX() public method

Modify X axis
public SetX ( float x ) : void
x float
return void

SetY() public method

Modify Y axis
public SetY ( float y ) : void
y float
return void