File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -38,4 +38,4 @@ export default class Celestial {
38
38
this . size = options . size || 0 ;
39
39
this . texture = options . texture || null ;
40
40
}
41
- }
41
+ }
Original file line number Diff line number Diff line change 6
6
7
7
/*----- Imports --------------------------------------------------------------*/
8
8
import { Point , Vector } from "./Utils.js" ;
9
+ import Celestial from "./Celestial.js" ;
9
10
10
11
/*----- Classes --------------------------------------------------------------*/
11
- /** @module GameData - Manages the game model. */
12
+ /** @module GameData Manages the game model. */
12
13
export default class {
13
14
/** Initialize a game model. */
14
15
constructor ( ) {
15
- /** @var {string} id - Short game ID based on the current time. */
16
+ /** @var {string} id Short game ID based on the current time. */
16
17
this . id = Math . round ( + new Date ( ) / 1e3 ) . toString ( 26 ) ;
17
- /** @var {Object} mouse - Data regarding the user's mouse. */
18
+ /** @var {Object} mouse Data regarding the user's mouse. */
18
19
this . mouse = {
19
- /** @var {boolean} mouse.isDown - Is mouse currently down? */
20
+ /** @var {boolean} mouse.isDown Is mouse currently down? */
20
21
isDown : false ,
21
- /** @var {Object} mouse.initPosition - Position of mouse on down. */
22
+ /** @var {Object} mouse.initPosition Position of mouse on down. */
22
23
initPosition : new Point ( 0 , 0 ) ,
23
- /** @var {Object} mouse.position - Current position of mouse. */
24
+ /** @var {Object} mouse.position Current position of mouse. */
24
25
position : new Point ( 0 , 0 ) ,
25
26
} ;
27
+ /** @var {Celestial[]} scene Array of game objects in current scene. */
28
+ this . scene = [ ] ;
26
29
}
27
30
}
You can’t perform that action at this time.
0 commit comments