You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
901 B
38 lines
901 B
import { Player, PlayerPhantom } from "./Player"
|
|
import { Action } from "./Action"
|
|
import { CourtObject } from "./CourtObjects"
|
|
|
|
export interface Tactic {
|
|
id: number
|
|
name: string
|
|
content: TacticContent
|
|
}
|
|
|
|
export interface TacticContent {
|
|
components: TacticComponent[]
|
|
actions: Action[]
|
|
}
|
|
|
|
export type TacticComponent = Player | CourtObject | PlayerPhantom
|
|
export type ComponentId = string
|
|
|
|
export interface Component<T> {
|
|
/**
|
|
* The component's type
|
|
*/
|
|
readonly type: T
|
|
/**
|
|
* The component's identifier
|
|
*/
|
|
readonly id: ComponentId
|
|
/**
|
|
* Percentage of the component's position to the bottom (0 means top, 1 means bottom, 0.5 means middle)
|
|
*/
|
|
readonly bottomRatio: number
|
|
|
|
/**
|
|
* Percentage of the component's position to the right (0 means left, 1 means right, 0.5 means middle)
|
|
*/
|
|
readonly rightRatio: number
|
|
}
|