source/Player.hx:109: characters 30-43 : Class<flixel.input.gamepad.PS3ButtonID> has no field X
source/Player.hx:114: characters 30-48 : Class<flixel.input.gamepad.PS3ButtonID> has no field SQUARE
source/Player.hx:119: characters 30-50 : Class<flixel.input.gamepad.PS3ButtonID> has no field TRIANGLE
source/Player.hx:124: characters 30-48 : Class<flixel.input.gamepad.PS3ButtonID> has no field CIRCLE
help please! I'm sure it's a noob thing i'm doing
Relevant code
package;
import org.flixel.*;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.group.FlxGroup;
import flixel.text.FlxText;
import flixel.tile.FlxTilemap;
import flixel.util.FlxColor;
import openfl.Assets;
import flixel.input.gamepad.FlxGamepad;
import flixel.input.gamepad.PS3ButtonID;
class Player extends FlxSprite
{
private var _gamePad:FlxGamepad;
override public function update():Void
{
////////PS3 Controller
_gamePad = FlxG.gamepads.lastActive;
if (_gamePad != null)
{
gamepadControls();
}
super.update();
}
private function gamepadControls():Void
{
if (_gamePad.pressed(PS3ButtonID.X))
{
trace("The X button of the PS3 controller is pressed.");
}
if (_gamePad.pressed(PS3ButtonID.SQUARE))
{
trace("The SQUARE button of the PS3 controller is pressed.");
}
if (_gamePad.pressed(PS3ButtonID.TRIANGLE))
{
trace("The TRIANGLE button of the PS3 controller is pressed.");
}
if (_gamePad.pressed(PS3ButtonID.CIRCLE))
{
trace("The CIRCLE button of the PS3 controller is pressed.");
}
}
}