Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/ATC-181 #236

Merged
merged 34 commits into from
Jan 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e1e15a7
feature/ATC-181 - Creates AircraftCommander class to run commands on …
n8rzz Dec 22, 2016
7b38a0a
feature/ATC-181 - Adds window methods as instantiation arguments, add…
n8rzz Dec 22, 2016
6d253bf
feature/ATC-181 - changes ref from aircraft to this
n8rzz Dec 22, 2016
ed4b04d
Replaced string sid with enums value
Dabea Dec 27, 2016
5da479f
simplifed logic in AircraftInstanceModel.js for cancelLanding
Dabea Jan 2, 2017
a5d582f
removed TODO message for simplifing logic
Dabea Jan 2, 2017
8122c0c
simplified updatePhysics with the addition of updateSpeedPhysics
Dabea Jan 2, 2017
692e5d6
simplifed updatePhysics by adding aircraftTurnPhysics()
Dabea Jan 4, 2017
27d93fd
simplified updatePhysics() by adding updateAltitudePhysics()
Dabea Jan 4, 2017
367185d
simplified updateAltituePhysics by creating increaseAorcraftA;totdie …
Dabea Jan 8, 2017
ac7d2fe
fixed spaceing and simplied more logic
Dabea Jan 8, 2017
3916a4e
added TODO for increaseAircraftAltitue and decreaseAircraftAlititude
Dabea Jan 8, 2017
be945bb
fixed doc block descriptions
Dabea Jan 8, 2017
b5a090e
updated aicraftTurnPhysics to updateeAircraftTurnPhysics for more con…
Dabea Jan 8, 2017
1fb3c01
added TODO
Dabea Jan 10, 2017
abb566e
simplified cancelFix logic by returning early
Dabea Jan 10, 2017
1a4fe49
fixed spaceing on cancelFix
Dabea Jan 10, 2017
a868025
Simplified updatePhysics with the addtion of updateGroundPhyics and u…
Dabea Jan 10, 2017
2c2fcfb
removed unused variable and change scaleSpeed to a const
Dabea Jan 10, 2017
72d6f2c
fixed spelling
Dabea Jan 11, 2017
4254f74
created warnInterceptAngle function to simplifiy updateTarget and red…
Dabea Jan 12, 2017
99ba218
Removed TODO that was fixed
Dabea Jan 12, 2017
e5b547a
simplifed updateTarget by adding updateFixTarget
Dabea Jan 12, 2017
f8c3ef8
Merge branch 'develop' of https://github.com/n8rzz/atc into feature/A…
Dabea Jan 15, 2017
f1c6218
'Completed Merge from devlo'
Dabea Jan 15, 2017
2c26e0d
resolves both n8rzz/atc#254 and zlsa/atc#777 by removeing -+.02 variance
Dabea Jan 18, 2017
d7b348d
updated comments to make more sense and added and removed spaces wher…
Dabea Jan 18, 2017
cb598fa
fixed spelling issue on comment
Dabea Jan 18, 2017
0d58fcd
improved comment
Dabea Jan 18, 2017
95c9d3d
removed console.log messages
Dabea Jan 18, 2017
2a2355c
fixed bug where aircraft info box dose not apear when given taxi command
Dabea Jan 22, 2017
4147078
Merge branch 'develop' of https://github.com/n8rzz/atc into feature/A…
n8rzz Jan 23, 2017
f0d7f78
feature/ATC-181 - adds changelog entry
n8rzz Jan 23, 2017
43b2269
feature/ATC-181 - updates runwayModel method name that was changed
n8rzz Jan 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Major
- Restructures `src` files into `client` and `server` folders. [#220](https://github.com/n8rzz/atc/issues/220)
- Updates Node to version 7.0.0 [#184](https://github.com/n8rzz/atc/issues/184)
- Moves aircraft command logic from `AircraftInstanceModel` to new `AircraftCommander` class [#181](https://github.com/n8rzz/atc/issues/181)

### Minor
- Changes `AircraftStripView` text outputs to be all uppercase [#193](https://github.com/n8rzz/atc/issues/193)
Expand Down
6 changes: 5 additions & 1 deletion src/assets/scripts/client/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import LoadingView from './LoadingView';
import AirportController from './airport/AirportController';
import GameController from './game/GameController';
import TutorialView from './tutorial/TutorialView';
import AircraftCommander from './aircraft/AircraftCommander';
import InputController from './InputController';
import UiController from './UiController';
import CanvasController from './canvas/CanvasController';
Expand Down Expand Up @@ -57,6 +58,7 @@ export default class App {
this.contentQueue = null;
this.airportController = null;
this.tutorialView = null;
this.aircraftCommander = null;
this.inputController = null;
this.uiController = null;
this.canvasController = null;
Expand Down Expand Up @@ -104,8 +106,9 @@ export default class App {
this.airportController = new AirportController(airportLoadList, this.updateRun);
this.gameController = new GameController(this.getDeltaTime);
this.tutorialView = new TutorialView(this.$element);
this.inputController = new InputController(this.$element);
this.uiController = new UiController(this.$element);
this.aircraftCommander = new AircraftCommander(this.airportController, this.gameController, this.uiController);
this.inputController = new InputController(this.$element, this.aircraftCommander);
this.canvasController = new CanvasController(this.$element);
this.gameClockView = new GameClockView(this.$element);

Expand Down Expand Up @@ -163,6 +166,7 @@ export default class App {
this.airportController = null;
this.gameController = null;
this.tutorialView = null;
this.aircraftCommander = null;
this.inputController = null;
this.uiController = null;
this.canvasController = null;
Expand Down
6 changes: 4 additions & 2 deletions src/assets/scripts/client/InputController.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,15 @@ export default class InputController {
/**
* @constructor
*/
constructor($element) {
constructor($element, aircraftCommander) {
this.$element = $element;
this.$window = null;
this.$commandInput = null;
this.$canvases = null;
this.$sidebar = null;

this._aircraftCommander = aircraftCommander;

this.input = input;
this.input.command = '';
this.input.callsign = '';
Expand Down Expand Up @@ -880,6 +882,6 @@ export default class InputController {

const aircraft = prop.aircraft.list[match];

return aircraft.runCommands(commandParser.args);
return this._aircraftCommander.runCommands(aircraft, commandParser.args);
}
}
Loading