import { Component } from "../../ecs/classes/Component"; import { ComponentConstructor } from '../../ecs/interfaces/ComponentInterfaces'; import { Behavior } from "../../common/interfaces/Behavior"; import { Checker } from "../../game/types/Checker"; /** * @author HydraFire */ export interface StateObject { components: string[] role: string uuid: string storage: StorageInterface[] } export interface StorageInterface { component: string variables: string } export interface InitStorageInterface { component: ComponentConstructor> variables: string[] } export interface GameMode { name: string priority: number registerActionTagComponents: ComponentConstructor>[] registerStateTagComponents: ComponentConstructor>[] initGameState: { [key: string]: { components: ComponentConstructor>[] storage: InitStorageInterface[] }; }; gamePlayerRoles: GameRolesInterface gameObjectRoles: GameRolesInterface } export interface RoleBehaviorWithTarget { sortMetod?: any, targetsRole: { [key: string]: { watchers?: ComponentConstructor>[][], checkers?: Array<{ function: Checker, args?: any }> args?: any } } } export interface RoleBehaviors { [key: string]: Array<{ behavior: Behavior, args?: any, watchers?: ComponentConstructor>[][], checkers?: Array<{ function: Checker, args?: any }>, takeEffectOn?: RoleBehaviorWithTarget; }>; } export interface GameRolesInterface { [key: string]: RoleBehaviors }