Available in the Gaming / Industries Circle
quantum | v2 switch to V1  

Input

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.

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).

To Document Top