注释
This commit is contained in:
parent
171c0264a2
commit
ca0f89a1b8
@ -3,9 +3,13 @@ import { ArrowState } from "./state/ArrowState";
|
||||
import { PlayerState } from "./state/PlayerState";
|
||||
|
||||
export interface GameSystemState {
|
||||
// 当前的时间(游戏时间)
|
||||
now: number,
|
||||
// 玩家
|
||||
players: PlayerState[],
|
||||
// 飞行中的箭矢
|
||||
arrows: ArrowState[],
|
||||
// 箭矢的 ID 生成
|
||||
nextArrowId: number
|
||||
}
|
||||
|
||||
@ -119,4 +123,9 @@ export interface TimePast {
|
||||
type: 'TimePast',
|
||||
dt: number
|
||||
}
|
||||
export type GameSystemInput = PlayerMove | PlayerAttack | PlayerJoin | PlayerLeave | TimePast;
|
||||
|
||||
export type GameSystemInput = PlayerMove
|
||||
| PlayerAttack
|
||||
| PlayerJoin
|
||||
| PlayerLeave
|
||||
| TimePast;
|
@ -1,6 +1,9 @@
|
||||
export type ArrowState = {
|
||||
id: number,
|
||||
// 谁发出的箭
|
||||
fromPlayerId: number,
|
||||
// 落地时间(游戏时间)
|
||||
targetTime: number,
|
||||
// 落点位置(游戏位置)
|
||||
targetPos: { x: number, y: number }
|
||||
}
|
Loading…
Reference in New Issue
Block a user