Documentation ¶
Index ¶
Constants ¶
const ( // PutTower is a type of action that represents putting a tower. PutTower = ActionType(iota) // SellTower is a type of action that represents selling a tower. SellTower // UpgradeTower is a type of action that represents upgrading a tower. UpgradeTower // TurnOff is a type of action that represents turning off a tower. TurnOff // TurnOn is a type of action that represents turning on a tower. TurnOn // TuneFirst is a type of action that represents tuning first. TuneFirst // TuneStrong is a type of action that represents tuning strong. TuneStrong // TuneWeak is a type of action that represents tuning weak. TuneWeak // Stop is a type of action that represents stopping the game. Stop )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { // F is a frame when the action is performed. F general.Frames `json:"f"` // Type is a type of the action. Type ActionType `json:"type"` // Info is an info of the action. Info any `json:"info"` }
Action is an entity that represents an action.
func (*Action) UnmarshalJSON ¶
UnmarshalJSON unmarshals the action.
type InfoPutTower ¶
type InfoPutTower struct { // Name is a name of the tower. Name string `json:"name"` // X is a x coordinate of the tower. X int `json:"x"` // Y is a y coordinate of the tower. Y int `json:"y"` }
InfoPutTower is an info of the action that represents putting a tower.
type InfoSellTower ¶
type InfoSellTower struct { // Index is an index of the tower. Index int `json:"index"` }
InfoSellTower is an info of the action that represents selling a tower.
type InfoStop ¶
type InfoStop struct { // Null is a null. Null any `json:"null"` }
InfoStop is an info of the action that represents stopping the game.
type InfoTuneFirst ¶
type InfoTuneFirst struct { // Index is an index of the tower. Index int `json:"index"` }
InfoTuneFirst is an info of the action that represents tuning first.
type InfoTuneStrong ¶
type InfoTuneStrong struct { // Index is an index of the tower. Index int `json:"index"` }
InfoTuneStrong is an info of the action that represents tuning strong.
type InfoTuneWeak ¶
type InfoTuneWeak struct { // Index is an index of the tower. Index int `json:"index"` }
InfoTuneWeak is an info of the action that represents tuning weak.
type InfoTurnOffTower ¶
type InfoTurnOffTower struct { // Index is an index of the tower. Index int `json:"index"` }
InfoTurnOffTower is an info of the action that represents turning off a tower.
type InfoTurnOnTower ¶
type InfoTurnOnTower struct { // Index is an index of the tower. Index int `json:"index"` }
InfoTurnOnTower is an info of the action that represents turning on a tower.
type InfoUpgradeTower ¶
type InfoUpgradeTower struct { // Index is an index of the tower. Index int `json:"index"` }
InfoUpgradeTower is an info of the action that represents upgrading a tower.
type Watcher ¶
type Watcher struct { // Name is a name of the watcher. Name string `json:"name"` // Time is a time of the watcher. Time string `json:"time"` // InitPlayerMapState is an initial player map state. InitPlayerMapState ingame.PlayerMapState `json:"init_player_map_state"` // Actions is a list of actions. Actions []Action `json:"actions"` }
Watcher is an entity that represents a watcher.