Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Player.js
Show All 20 Lines | Player.prototype.Init = function() | ||||
this.resourceCount = {}; | this.resourceCount = {}; | ||||
this.tradingGoods = []; // goods for next trade-route and its proba in % (the sum of probas must be 100) | this.tradingGoods = []; // goods for next trade-route and its proba in % (the sum of probas must be 100) | ||||
this.team = -1; // team number of the player, players on the same team will always have ally diplomatic status - also this is useful for team emblems, scoring, etc. | this.team = -1; // team number of the player, players on the same team will always have ally diplomatic status - also this is useful for team emblems, scoring, etc. | ||||
this.teamsLocked = false; | this.teamsLocked = false; | ||||
this.state = "active"; // game state - one of "active", "defeated", "won" | this.state = "active"; // game state - one of "active", "defeated", "won" | ||||
this.diplomacy = []; // array of diplomatic stances for this player with respect to other players (including gaia and self) | this.diplomacy = []; // array of diplomatic stances for this player with respect to other players (including gaia and self) | ||||
this.sharedDropsites = false; | this.sharedDropsites = false; | ||||
this.formations = []; | this.formations = []; | ||||
this.chosenFormation = "formations/null" | |||||
this.startCam = undefined; | this.startCam = undefined; | ||||
this.controlAllUnits = false; | this.controlAllUnits = false; | ||||
this.isAI = false; | this.isAI = false; | ||||
this.gatherRateMultiplier = 1; | this.gatherRateMultiplier = 1; | ||||
this.tradeRateMultiplier = 1; | this.tradeRateMultiplier = 1; | ||||
this.cheatsEnabled = false; | this.cheatsEnabled = false; | ||||
this.cheatTimeMultiplier = 1; | this.cheatTimeMultiplier = 1; | ||||
this.heroes = []; | this.heroes = []; | ||||
▲ Show 20 Lines • Show All 479 Lines • ▼ Show 20 Lines | Player.prototype.GetFormations = function() | ||||
return this.formations; | return this.formations; | ||||
}; | }; | ||||
Player.prototype.SetFormations = function(formations) | Player.prototype.SetFormations = function(formations) | ||||
{ | { | ||||
this.formations = formations; | this.formations = formations; | ||||
}; | }; | ||||
Player.prototype.SetChosenFormation = function(formation) | |||||
{ | |||||
this.chosenFormation = formation; | |||||
}; | |||||
Player.prototype.GetChosenFormation = function(formation) | |||||
{ | |||||
return this.chosenFormation; | |||||
}; | |||||
Player.prototype.GetStartingCameraPos = function() | Player.prototype.GetStartingCameraPos = function() | ||||
{ | { | ||||
return this.startCam.position; | return this.startCam.position; | ||||
}; | }; | ||||
Player.prototype.GetStartingCameraRot = function() | Player.prototype.GetStartingCameraRot = function() | ||||
{ | { | ||||
return this.startCam.rotation; | return this.startCam.rotation; | ||||
▲ Show 20 Lines • Show All 333 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator