Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/UnitMotionFlying.js
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | UnitMotionFlying.prototype.Init = function() | ||||
this.landing = false; | this.landing = false; | ||||
this.onGround = true; | this.onGround = true; | ||||
this.pitch = 0; | this.pitch = 0; | ||||
this.roll = 0; | this.roll = 0; | ||||
this.waterDeath = false; | this.waterDeath = false; | ||||
this.passabilityClass = Engine.QueryInterface(SYSTEM_ENTITY, IID_Pathfinder).GetPassabilityClass(this.template.PassabilityClass); | this.passabilityClass = Engine.QueryInterface(SYSTEM_ENTITY, IID_Pathfinder).GetPassabilityClass(this.template.PassabilityClass); | ||||
}; | }; | ||||
UnitMotionFlying.prototype.Update = function(newTemplate) { | |||||
warn("UnitMotionFlying.Update() is not implemented"); | |||||
}; | |||||
UnitMotionFlying.prototype.OnUpdate = function(msg) | UnitMotionFlying.prototype.OnUpdate = function(msg) | ||||
{ | { | ||||
let turnLength = msg.turnLength; | let turnLength = msg.turnLength; | ||||
if (!this.hasTarget) | if (!this.hasTarget) | ||||
return; | return; | ||||
let cmpGarrisonHolder = Engine.QueryInterface(this.entity, IID_GarrisonHolder); | let cmpGarrisonHolder = Engine.QueryInterface(this.entity, IID_GarrisonHolder); | ||||
let cmpPosition = Engine.QueryInterface(this.entity, IID_Position); | let cmpPosition = Engine.QueryInterface(this.entity, IID_Position); | ||||
let pos = cmpPosition.GetPosition(); | let pos = cmpPosition.GetPosition(); | ||||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator