Input
Available in the Gaming Circle and Industries Circle
Overview
The Tower Rush Sample exclusively uses Quantum Commands for input as the gameplay only requires one-of actions rather than tick-by-tick input. Therefore no data is set or sent via the regular input struct.
Unity
The UseCardCommand
is sent when a player drops a card on the battlefield - see CardManager.UseCard()
.
UseCardCommand
The command contains the card's index within the player's list of available cards and the position where the action should take place.
C#
public class UseCardCommand : DeterministicCommand
{
public byte CardIndex;
public FPVector2 Position;
public override void Serialize(BitStream stream)
{
stream.Serialize(ref CardIndex);
stream.Serialize(ref Position);
}
}
Quantum
The UseCardCommand
is polled by the CardManagerSystem
and the data from the command is passed to the CardManager
component for processing. The data could also be passed to the CardManager
of a player AI (not currently implemented).