Browse code

upgrade to typescript 2

devnewton authored on 05/11/2016 11:37:01
Showing 24 changed files
... ...
@@ -1,3 +1,3 @@
1
-import { ShmuprpgGame } from "./ShmuprpgGame.ts";
1
+import { ShmuprpgGame } from "./ShmuprpgGame";
2 2
 
3 3
 new ShmuprpgGame();
4 4
\ No newline at end of file
... ...
@@ -1,14 +1,14 @@
1 1
 /// <reference path="../typings/phaser.d.ts"/>
2
-import {Intro} from "./states/Intro.ts";
3
-import {Title} from "./states/Title.ts";
4
-import {DemoEnding} from "./states/DemoEnding.ts";
5
-import {Help} from "./states/Help.ts";
6
-import {Options} from "./states/Options.ts";
7
-import {KeyboardOptions} from "./states/KeyboardOptions.ts";
8
-import {GamepadOptions} from "./states/GamepadOptions.ts";
9
-import {Level} from "./states/Level.ts";
10
-import {GameOver} from "./states/GameOver.ts";
11
-import {Controls} from "./utils/Controls.ts";
2
+import {Intro} from "./states/Intro";
3
+import {Title} from "./states/Title";
4
+import {DemoEnding} from "./states/DemoEnding";
5
+import {Help} from "./states/Help";
6
+import {Options} from "./states/Options";
7
+import {KeyboardOptions} from "./states/KeyboardOptions";
8
+import {GamepadOptions} from "./states/GamepadOptions";
9
+import {Level} from "./states/Level";
10
+import {GameOver} from "./states/GameOver";
11
+import {Controls} from "./utils/Controls";
12 12
 
13 13
 export class ShmuprpgGame extends Phaser.Game {
14 14
 
... ...
@@ -1,5 +1,5 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Bird} from "./Bird.ts";
2
+import {Bird} from "./Bird";
3 3
 
4 4
 export class BirdFlock extends Phaser.Group {
5 5
 
... ...
@@ -1,8 +1,8 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {ShmuprpgGame} from "../ShmuprpgGame.ts";
3
-import {CircularGun} from "./CircularGun.ts";
4
-import {Pathfinder} from "../ia/services/Pathfinder.ts";
5
-import * as b3 from "../ia/decisions/b3.ts";
2
+import {ShmuprpgGame} from "../ShmuprpgGame";
3
+import {CircularGun} from "./CircularGun";
4
+import {Pathfinder} from "../ia/services/Pathfinder";
5
+import * as b3 from "../ia/decisions/b3";
6 6
 
7 7
 export class Bunny extends Phaser.Sprite {
8 8
 
... ...
@@ -1,5 +1,5 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Bullet} from "./Bullet.ts";
2
+import {Bullet} from "./Bullet";
3 3
 
4 4
 export class CircularGun extends Phaser.Group {
5 5
 
... ...
@@ -1,7 +1,7 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Level} from "../states/Level.ts";
3
-import {Pathfinder} from "../ia/services/Pathfinder.ts";
4
-import * as b3 from "../ia/decisions/b3.ts";
2
+import {Level} from "../states/Level";
3
+import {Pathfinder} from "../ia/services/Pathfinder";
4
+import * as b3 from "../ia/decisions/b3";
5 5
 
6 6
 export class Grobelin extends Phaser.Sprite {
7 7
 
8 8
deleted file mode 100644
... ...
@@ -1,123 +0,0 @@
1
-{
2
-    "title": "Grobelin behavior tree",
3
-    "description": "",
4
-    "root": "32f94332-93da-4c43-9b3d-cc2f33a473e2",
5
-    "display": {
6
-        "camera_x": 540.5,
7
-        "camera_y": 439.5,
8
-        "camera_z": 1,
9
-        "x": -224,
10
-        "y": -176.00000000000003
11
-    },
12
-    "properties": {},
13
-    "nodes": {
14
-        "42f725fe-8d8b-4325-87c4-2911eccf5003": {
15
-            "id": "42f725fe-8d8b-4325-87c4-2911eccf5003",
16
-            "name": "CanAttack",
17
-            "title": "IsNearEnemy",
18
-            "description": "",
19
-            "display": {
20
-                "x": 400,
21
-                "y": -293.33333333333337
22
-            },
23
-            "parameters": {},
24
-            "properties": {}
25
-        },
26
-        "32f94332-93da-4c43-9b3d-cc2f33a473e2": {
27
-            "id": "32f94332-93da-4c43-9b3d-cc2f33a473e2",
28
-            "name": "Priority",
29
-            "title": "Priority",
30
-            "description": "",
31
-            "display": {
32
-                "x": -16,
33
-                "y": -176.00000000000003
34
-            },
35
-            "parameters": {},
36
-            "properties": {},
37
-            "children": [
38
-                "adda17fa-5c0e-4b94-8713-86bc2160dc76",
39
-                "74619d1d-a9d8-4902-9a6d-77582dc61e58",
40
-                "15b81665-001c-4ff6-8fc9-c0174ae15416"
41
-            ]
42
-        },
43
-        "adda17fa-5c0e-4b94-8713-86bc2160dc76": {
44
-            "id": "adda17fa-5c0e-4b94-8713-86bc2160dc76",
45
-            "name": "Sequence",
46
-            "title": "Attack",
47
-            "description": "",
48
-            "display": {
49
-                "x": 192,
50
-                "y": -261.33333333333337
51
-            },
52
-            "parameters": {},
53
-            "properties": {},
54
-            "children": [
55
-                "42f725fe-8d8b-4325-87c4-2911eccf5003",
56
-                "4d0fb23e-1431-4fbf-8b05-424831e12f89"
57
-            ]
58
-        },
59
-        "4d0fb23e-1431-4fbf-8b05-424831e12f89": {
60
-            "id": "4d0fb23e-1431-4fbf-8b05-424831e12f89",
61
-            "name": "Attack",
62
-            "title": "AttackEnemy",
63
-            "description": "",
64
-            "display": {
65
-                "x": 400,
66
-                "y": -229.33333333333337
67
-            },
68
-            "parameters": {},
69
-            "properties": {}
70
-        },
71
-        "15b81665-001c-4ff6-8fc9-c0174ae15416": {
72
-            "id": "15b81665-001c-4ff6-8fc9-c0174ae15416",
73
-            "name": "MoveToHero",
74
-            "title": "SearchAPathToEnemy",
75
-            "description": "",
76
-            "display": {
77
-                "x": 192,
78
-                "y": -101.33333333333337
79
-            },
80
-            "parameters": {},
81
-            "properties": {}
82
-        },
83
-        "74619d1d-a9d8-4902-9a6d-77582dc61e58": {
84
-            "id": "74619d1d-a9d8-4902-9a6d-77582dc61e58",
85
-            "name": "FollowPath",
86
-            "title": "FollowPath",
87
-            "description": "",
88
-            "display": {
89
-                "x": 192,
90
-                "y": -165.33333333333337
91
-            },
92
-            "parameters": {},
93
-            "properties": {}
94
-        }
95
-    },
96
-    "custom_nodes": [
97
-        {
98
-            "name": "CanAttack",
99
-            "title": "",
100
-            "category": "condition"
101
-        },
102
-        {
103
-            "name": "Attack",
104
-            "title": "",
105
-            "category": "action"
106
-        },
107
-        {
108
-            "name": "MoveToHero",
109
-            "title": "",
110
-            "category": "action"
111
-        },
112
-        {
113
-            "name": "HasPath",
114
-            "title": "",
115
-            "category": "condition"
116
-        },
117
-        {
118
-            "name": "FollowPath",
119
-            "title": "",
120
-            "category": "action"
121
-        }
122
-    ]
123
-}
124 0
\ No newline at end of file
... ...
@@ -1,8 +1,8 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Grobelin} from "./Grobelin.ts";
3
-import { ShmuprpgGame } from "../ShmuprpgGame.ts";
4
-import { Level } from "../states/Level.ts";
5
-import { Pathfinder } from "../ia/services/Pathfinder.ts";
2
+import {Grobelin} from "./Grobelin";
3
+import { ShmuprpgGame } from "../ShmuprpgGame";
4
+import { Level } from "../states/Level";
5
+import { Pathfinder } from "../ia/services/Pathfinder";
6 6
 
7 7
 export class GrobelinHorde extends Phaser.Group {
8 8
 
... ...
@@ -1,8 +1,8 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import { ShmuprpgGame } from "../ShmuprpgGame.ts";
3
-import { CircularGun } from "./MachineGun.ts";
4
-import { Controls } from "../utils/Controls.ts";
5
-import {Bullet} from "./Bullet.ts";
2
+import { ShmuprpgGame } from "../ShmuprpgGame";
3
+import { CircularGun } from "./MachineGun";
4
+import { Controls } from "../utils/Controls";
5
+import {Bullet} from "./Bullet";
6 6
 
7 7
 export class Hero extends Phaser.Sprite {
8 8
 
... ...
@@ -1,5 +1,5 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Bullet} from "./Bullet.ts";
2
+import {Bullet} from "./Bullet";
3 3
 
4 4
 export class CircularGun extends Phaser.Group {
5 5
 
... ...
@@ -1,8 +1,8 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Level} from "../states/Level.ts";
3
-import {Pathfinder} from "../ia/services/Pathfinder.ts";
4
-import * as b3 from "../ia/decisions/b3.ts";
5
-import {CircularGun} from "./MachineGun.ts";
2
+import {Level} from "../states/Level";
3
+import {Pathfinder} from "../ia/services/Pathfinder";
4
+import * as b3 from "../ia/decisions/b3";
5
+import {CircularGun} from "./MachineGun";
6 6
 
7 7
 export class Spider extends Phaser.Sprite {
8 8
 
... ...
@@ -1,8 +1,8 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Spider} from "./Spider.ts";
3
-import { ShmuprpgGame } from "../ShmuprpgGame.ts";
4
-import { Level } from "../states/Level.ts";
5
-import { Pathfinder } from "../ia/services/Pathfinder.ts";
2
+import {Spider} from "./Spider";
3
+import { ShmuprpgGame } from "../ShmuprpgGame";
4
+import { Level } from "../states/Level";
5
+import { Pathfinder } from "../ia/services/Pathfinder";
6 6
 
7 7
 export class SpiderHorde extends Phaser.Group {
8 8
 
... ...
@@ -1,6 +1,6 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {AbstractState} from "./AbstractState.ts";
3
-import {MenuButton} from "../ui/MenuButton.ts";
2
+import {AbstractState} from "./AbstractState";
3
+import {MenuButton} from "../ui/MenuButton";
4 4
 
5 5
 export class DemoEnding extends AbstractState {
6 6
 
... ...
@@ -1,6 +1,6 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import { AbstractState } from "./AbstractState.ts"; // you import only AClass
3
-import {MenuButton} from "../ui/MenuButton.ts";
2
+import { AbstractState } from "./AbstractState"; // you import only AClass
3
+import {MenuButton} from "../ui/MenuButton";
4 4
 
5 5
 export class GameOver extends AbstractState {
6 6
 
... ...
@@ -1,7 +1,7 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {AbstractState} from "./AbstractState.ts";
3
-import {MenuButton} from "../ui/MenuButton.ts";
4
-import { ShmuprpgGame } from "../ShmuprpgGame.ts";
2
+import {AbstractState} from "./AbstractState";
3
+import {MenuButton} from "../ui/MenuButton";
4
+import { ShmuprpgGame } from "../ShmuprpgGame";
5 5
 
6 6
 
7 7
 export class GamepadOptions extends AbstractState {
... ...
@@ -1,6 +1,6 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {AbstractState} from "./AbstractState.ts";
3
-import {MenuButton} from "../ui/MenuButton.ts";
2
+import {AbstractState} from "./AbstractState";
3
+import {MenuButton} from "../ui/MenuButton";
4 4
 
5 5
 export class Help extends AbstractState {
6 6
 
... ...
@@ -1,5 +1,5 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import { AbstractState } from "./AbstractState.ts"; // you import only AClass
2
+import { AbstractState } from "./AbstractState"; // you import only AClass
3 3
 
4 4
 export class Intro extends AbstractState {
5 5
 
... ...
@@ -1,7 +1,7 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {AbstractState} from "./AbstractState.ts";
3
-import {MenuButton} from "../ui/MenuButton.ts";
4
-import { ShmuprpgGame } from "../ShmuprpgGame.ts";
2
+import {AbstractState} from "./AbstractState";
3
+import {MenuButton} from "../ui/MenuButton";
4
+import { ShmuprpgGame } from "../ShmuprpgGame";
5 5
 
6 6
 
7 7
 export class KeyboardOptions extends AbstractState {
... ...
@@ -1,16 +1,16 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import { AbstractState } from "./AbstractState.ts";
3
-import { Hero } from "../entities/Hero.ts";
4
-import {BirdFlock} from "../entities/BirdFlock.ts";
5
-import {GrobelinHorde} from "../entities/GrobelinHorde.ts";
6
-import {SpiderHorde} from "../entities/SpiderHorde.ts";
7
-import {Spider} from "../entities/Spider.ts";
8
-import {Bunny} from "../entities/Bunny.ts";
9
-
10
-import {Pathfinder} from "../ia/services/Pathfinder.ts";
11
-import {DamageResolver} from "../utils/DamageResolver.ts";
12
-
13
-import {Dialog} from "../ui/Dialog.ts";
2
+import { AbstractState } from "./AbstractState";
3
+import { Hero } from "../entities/Hero";
4
+import {BirdFlock} from "../entities/BirdFlock";
5
+import {GrobelinHorde} from "../entities/GrobelinHorde";
6
+import {SpiderHorde} from "../entities/SpiderHorde";
7
+import {Spider} from "../entities/Spider";
8
+import {Bunny} from "../entities/Bunny";
9
+
10
+import {Pathfinder} from "../ia/services/Pathfinder";
11
+import {DamageResolver} from "../utils/DamageResolver";
12
+
13
+import {Dialog} from "../ui/Dialog";
14 14
 
15 15
 export class Level extends AbstractState {
16 16
 
... ...
@@ -1,6 +1,6 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {AbstractState} from "./AbstractState.ts";
3
-import {MenuButton} from "../ui/MenuButton.ts";
2
+import {AbstractState} from "./AbstractState";
3
+import {MenuButton} from "../ui/MenuButton";
4 4
 
5 5
 export class Options extends AbstractState {
6 6
 
... ...
@@ -1,6 +1,6 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {AbstractState} from "./AbstractState.ts";
3
-import {MenuButton} from "../ui/MenuButton.ts";
2
+import {AbstractState} from "./AbstractState";
3
+import {MenuButton} from "../ui/MenuButton";
4 4
 
5 5
 export class Title extends AbstractState {
6 6
 
... ...
@@ -1,6 +1,6 @@
1 1
 /// <reference path="../../typings/phaser.d.ts"/>
2
-import {Controls} from "../utils/Controls.ts";
3
-import {ShmuprpgGame} from "../ShmuprpgGame.ts";
2
+import {Controls} from "../utils/Controls";
3
+import {ShmuprpgGame} from "../ShmuprpgGame";
4 4
 
5 5
 export class Dialog extends Phaser.Group {
6 6
     private dialogText: Phaser.Text;
... ...
@@ -1,18 +1,24 @@
1 1
 module.exports = {
2
-	files : {
3
-		javascripts : {
4
-			joinTo : {
5
-				'app.js' : /^app/,
6
-				'js/vendor.js' : /^(node_modules)/
2
+	files: {
3
+		javascripts: {
4
+			joinTo: {
5
+				'app.js': /^app/,
6
+				'js/vendor.js': /^(node_modules)/
7 7
 			}
8 8
 		},
9
-		stylesheets : {
10
-			joinTo : 'app.css'
9
+		stylesheets: {
10
+			joinTo: 'app.css'
11 11
 		}
12 12
 	},
13
-	modules : {
14
-		autoRequire : {
15
-			'app.js' : [ 'ShmuprpgApp' ]
13
+	modules: {
14
+		autoRequire: {
15
+			'app.js': ['ShmuprpgApp']
16
+		}
17
+	},
18
+	notifications: false,
19
+	plugins: {
20
+		brunchTypescript: {
21
+			ignoreErrors: true
16 22
 		}
17 23
 	}
18 24
 }
... ...
@@ -9,7 +9,7 @@
9 9
     "devDependencies": {
10 10
         "auto-reload-brunch": "^2.7.1",
11 11
         "brunch": "^2.8.2",
12
-        "brunch-typescript": "1.8.1"
12
+        "brunch-typescript": "2.0.0"
13 13
     },
14 14
     "dependencies": {
15 15
         "easystarjs": "0.3.0"