Unit.GetY (Civ5 API): Difference between revisions
From Civilization Modding Wiki
Jump to navigationJump to search
(Bot update) |
(→Usage: wrong return type) |
||
Line 10: | Line 10: | ||
=Usage= | =Usage= | ||
<code> | <code>'''int''' Unit:GetY<b>(</b><b>)</b></code> | ||
'''Returned Value''' | '''Returned Value''' | ||
:No description available. | :No description available. | ||
=Source code samples= | =Source code samples= |
Latest revision as of 19:08, 21 February 2014
This page is a part of the Lua and UI Reference (Civ5).
This function is a member of Unit. This is an instance method, invoke it with a colon. |
Usage
int Unit:GetY()
Returned Value
- No description available.
Source code samples
Redundant occurences have been removed.
Bombardment.lua
UI/InGame/Bombardment.lua
0035
|
thisY = pHeadSelectedUnit:GetY(); |
0193
|
Events.SpawnArrowEvent( attacker:GetX(), attacker:GetY(), hexX, hexY ); |
EnemyUnitPanel.lua (G&K)
DLC/Expansion/UI/InGame/WorldView/EnemyUnitPanel.lua
0931
|
local plotDistance = Map.PlotDistance(pCapital:GetX(), pCapital:GetY(), pMyUnit:GetX(), pMyUnit:GetY()); |
1480
|
local plotDistance = Map.PlotDistance(pCapital:GetX(), pCapital:GetY(), pTheirUnit:GetX(), pTheirUnit:GetY()); |
1821
|
local plotDistance = Map.PlotDistance(pCapital:GetX(), pCapital:GetY(), theirUnit:GetX(), theirUnit:GetY()); |
InGame.lua
UI/InGame/InGame.lua
0422
|
local hexID = ToHexFromGrid( Vector2( unit:GetX(), unit:GetY() ) ); |
0451
|
local unitY = unit:GetY(); |
0545
|
local thisY = pHeadSelectedUnit:GetY(); |
0999
|
Events.RequestYieldDisplay( YieldDisplayTypes.AREA, 2, unit:GetX(), unit:GetY() ); |
TurnsRemaining.lua - DLC_02 DLC
DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0543
|
if (pUnit:GetY() < 11 or pUnit:GetY() > 69) then |
0556
|
iDistance = Map.PlotDistance(1, iY, pUnit:GetX(), pUnit:GetY()); |
TurnsRemaining.lua - DLC_04 DLC
DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0201
|
iY = unit:GetY(); |
UnitFlagManager.lua
UI/InGame/UnitFlagManager.lua
0242
|
local worldPosX, worldPosY, worldPosZ = GridToWorld( pUnit:GetX(), pUnit:GetY() ); |
1409
|
local plot = Map.GetPlot( unit:GetX(), unit:GetY() ); |
UnitPanel.lua
UI/InGame/WorldView/UnitPanel.lua
0745
|
y = unit and unit:GetY() or 0, |
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.