Class PlayerInputBaseExtensions
Several extension methods that allow you to iterate over lists of inputs instead of individual inputs. If, for example, you want the joystick and keyboard to receive input from player 1, you should use these extension methods.
Inherited Members
Namespace: BomberDogs.Extensions
Assembly: Assembly-CSharp.dll
Syntax
public static class PlayerInputBaseExtensions
Methods
| Edit this page View SourceGetAxis(List<PlayerInputBase>)
Read all Inputs and get axis value
Declaration
public static Vector2 GetAxis(this List<PlayerInputBase> inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| List<PlayerInputBase> | inputs | List of inputs |
Returns
| Type | Description |
|---|---|
| Vector2 | Current horizontal and vertical axis value |
GetBackDown(List<PlayerInputBase>)
Read all Inputs and detect if the Back button is pressed
Declaration
public static bool GetBackDown(this List<PlayerInputBase> inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| List<PlayerInputBase> | inputs | List of inputs |
Returns
| Type | Description |
|---|---|
| bool | True when back is pressed |
GetDropBombDown(List<PlayerInputBase>)
Read all Inputs and detect if the DropBomb button is pressed
Declaration
public static bool GetDropBombDown(this List<PlayerInputBase> inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| List<PlayerInputBase> | inputs | List of inputs |
Returns
| Type | Description |
|---|---|
| bool | True when DropBomb is pressed |
GetHorizontalAxisDown(List<PlayerInputBase>)
Read all Inputs and detect if horizontal axis is pressed
Declaration
public static bool GetHorizontalAxisDown(this List<PlayerInputBase> inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| List<PlayerInputBase> | inputs | List of inputs |
Returns
| Type | Description |
|---|---|
| bool | True when horizontal axis is pressed |
GetStartDown(List<PlayerInputBase>)
Read all Inputs and detect if start button is pressed
Declaration
public static bool GetStartDown(this List<PlayerInputBase> inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| List<PlayerInputBase> | inputs | List of inputs |
Returns
| Type | Description |
|---|---|
| bool | True when start is pressed |
GetVerticalAxisDown(List<PlayerInputBase>)
Read all Inputs and detect if vertical axis is pressed
Declaration
public static bool GetVerticalAxisDown(this List<PlayerInputBase> inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| List<PlayerInputBase> | inputs | List of inputs |
Returns
| Type | Description |
|---|---|
| bool | True when vertical axis is pressed |