Vector2 (Civ5 API)
This page is a part of the Lua and UI Reference (Civ5).
This function is a global function. Use: include("FLuaVector.lua")
|
Usage
Vector2 Vector2(float i, float j)
Returned Value
- No description available.
Parameters
i: No description available. j: No description available.
Source code samples
Redundant occurences have been removed.
ActionInfoPanel.lua
UI/InGame/WorldView/ActionInfoPanel.lua
0110
|
local hex = ToHexFromGrid( Vector2(pPlot:GetX(), pPlot:GetY() ) ); |
CityBannerManager.lua
UI/InGame/CityBannerManager.lua
0021
|
local nullOffset = Vector2( 0, 0 ); |
1252
|
OnCityCreated( ToHexFromGrid( Vector2( city:GetX(), city:GetY() ) ), player:GetID(), city:GetID() ); |
CityStateDiploPopup.lua (G&K)
DLC/Expansion/UI/InGame/Popups/CityStateDiploPopup.lua
0614
|
local hex = ToHexFromGrid(Vector2(pPlot:GetX(), pPlot:GetY())); |
CityView.lua
UI/InGame/CityView/CityView.lua
1729
|
local hexPos = ToHexFromGrid( Vector2( plot:GetX(), plot:GetY() ) ); |
1824
|
Events.SerialEventHexHighlight( ToHexFromGrid( Vector2( plot:GetX(), plot:GetY() ) ), false, Vector4( 0.0, 1.0, 0.0, 1 ) ); |
1861
|
Events.SerialEventHexHighlight( ToHexFromGrid( Vector2( aPurchasablePlots[i]:GetX(), aPurchasablePlots[i]:GetY() ) ), true, Vector4( 1.0, 0.0, 1.0, 1 ) ); |
CivilopediaScreen.lua
UI/Civilopedia/CivilopediaScreen.lua
2601
|
local defaultPromotionPortraitOffset = Vector2( 256, 256 ); |
DebugMenu.lua
UI/InGame/DebugMenu.lua
0381
|
Events.SerialEventCameraOut( Vector2(0.5,0.5) ); |
0386
|
Events.SerialEventCameraIn( Vector2(0.5,0.5) ); |
DebugMode.lua
UI/InGame/DebugMode.lua
0037
|
Events.SerialEventHexHighlight( Vector2( g_iHexX, g_iHexY ), false, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); |
0420
|
Events.SerialEventHexHighlight( Vector2( g_iHexX, g_iHexY ), true, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); |
IconSupport.lua
UI/IconSupport.lua
0068
|
return Vector2( (offset % numCols) * iconSize, math.floor(offset / numCols) * iconSize ), filename; |
InGame.lua
UI/InGame/InGame.lua
0304
|
local hexID = ToHexFromGrid( Vector2( v.plot:GetX(), v.plot:GetY() ) ); |
0313
|
local hexID = ToHexFromGrid( Vector2( v:GetX(), v:GetY() ) ); |
0422
|
local hexID = ToHexFromGrid( Vector2( unit:GetX(), unit:GetY() ) ); |
0463
|
local hexID = ToHexFromGrid( Vector2( evalPlotX, evalPlotY ) ); |
0489
|
local hexID = ToHexFromGrid( Vector2( adjacentPlot:GetX(), adjacentPlot:GetY() ) ); |
0555
|
local hexID = ToHexFromGrid( Vector2( plotX, plotY) ); |
InGame.lua (G&K)
DLC/Expansion/UI/InGame/InGame.lua
0688
|
local iHexID = ToHexFromGrid( Vector2( iPlotX, iPlotY) ); |
TechTree.lua
UI/InGame/TechTree/TechTree.lua
0213
|
pipe.TechPipeIcon:SetTextureOffset(Vector2(72,72)); |
0227
|
pipe.TechPipeIcon:SetTextureOffset(Vector2(72,0)); |
0271
|
startPipe.TechPipeIcon:SetSize( Vector2(40, 42) ); |
0280
|
pipe.TechPipeIcon:SetTextureOffset(Vector2(0,72)); |
0294
|
pipe.TechPipeIcon:SetTextureOffset(Vector2(0,0)); |
TutorialEngine.lua
Tutorial/TutorialEngine.lua
0471
|
local hex = ToHexFromGrid( Vector2(plot:GetX(), plot:GetY() ) ); |
UnitFlagManager.lua
UI/InGame/UnitFlagManager.lua
0020
|
local GarrisonOffset = Vector2( -43, -39 ); |
0021
|
local GarrisonOtherOffset = Vector2( -55, -34 ); |
0022
|
local CityNonGarrisonOffset = Vector2( 45, -45 ); |
0023
|
local CivilianOffset = Vector2( 0, -15 ); |
0846
|
local offset = Vector2( 0, 0 ); |
UnitFlagManager.lua (G&K)
DLC/Expansion/UI/InGame/UnitFlagManager.lua
0023
|
local CivilianOffset = Vector2( 0, -25 ); |
WorldView.lua
UI/InGame/WorldView/WorldView.lua
0105
|
Events.SerialEventCameraOut( Vector2(0,0) ); |
0108
|
Events.SerialEventCameraIn( Vector2(0,0) ); |
0765
|
Events.SerialEventHexHighlight( Vector2( i, j ), true, turn1Color, attackPathBorderStyle ); |
0767
|
Events.SerialEventHexHighlight( Vector2( i, j ), true, turn1Color, pathBorderStyle ); |
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.