|
|
|
|
|
|
|
|
|
|
public override void Heuristic(in ActionBuffers actionsOut) |
|
|
|
{ |
|
|
|
var discreteActionsOut = actionsOut.ContinuousActions; |
|
|
|
discreteActionsOut[0] = Input.GetKey(KeyCode.W) ? 1 : Input.GetKey(KeyCode.S) ? -1 : 0; //inputV
|
|
|
|
discreteActionsOut[1] = Input.GetKey(KeyCode.E) ? 1 : Input.GetKey(KeyCode.Q) ? -1 : 0; //inputH
|
|
|
|
discreteActionsOut[2] = Input.GetKey(KeyCode.D) ? 1 : Input.GetKey(KeyCode.A) ? -1 : 0; //rotate
|
|
|
|
discreteActionsOut[3] = Input.GetKey(KeyCode.Space) ? 1 : 0; //shoot
|
|
|
|
var contActionsOut = actionsOut.ContinuousActions; |
|
|
|
contActionsOut[0] = Input.GetKey(KeyCode.W) ? 1 : Input.GetKey(KeyCode.S) ? -1 : 0; //inputV
|
|
|
|
contActionsOut[1] = Input.GetKey(KeyCode.E) ? 1 : Input.GetKey(KeyCode.Q) ? -1 : 0; //inputH
|
|
|
|
contActionsOut[2] = Input.GetKey(KeyCode.D) ? 1 : Input.GetKey(KeyCode.A) ? -1 : 0; //rotate
|
|
|
|
contActionsOut[3] = Input.GetKey(KeyCode.Space) ? 1 : 0; //shoot
|
|
|
|
|
|
|
|
} |
|
|
|
|