void Start() { buttonW = new moveForward(); buttonA = new moveLeft(); buttonS = new moveBack(); buttonD = new moveRight(); buttonR = new UndoCommand(); buttonSpace = new jumpCommand(); }
void Start() { //Bind keys with commands buttonB = new DoNothing(); buttonW = new moveForward(); buttonS = new moveReverse(); buttonA = new moveLeft(); buttonD = new moveRight(); buttonZ = new undoCommand(); rb = GetComponent <Rigidbody>(); }
void Start() { //Bind keys with commands Command moveLeft = new moveLeft(); Command moveRight = new moveRight(); patrolingBehaviorCommands.Add(moveLeft); patrolingBehaviorCommands.Add(moveLeft); patrolingBehaviorCommands.Add(moveLeft); patrolingBehaviorCommands.Add(moveLeft); patrolingBehaviorCommands.Add(moveLeft); patrolingBehaviorCommands.Add(moveRight); patrolingBehaviorCommands.Add(moveRight); patrolingBehaviorCommands.Add(moveRight); patrolingBehaviorCommands.Add(moveRight); patrolingBehaviorCommands.Add(moveRight); }