Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
civilization-iii
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
true-history-committee
civilization-iii
Commits
dac4d3d2
Commit
dac4d3d2
authored
Mar 03, 2018
by
redsuncore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ManagementUI Completed. (Investment UI Activated)
내정 UI 활성화. 세율, 투자, 병참 조절가능.
parent
490850c2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
270 additions
and
16 deletions
+270
-16
MainScene.unity
Assets/Scenes/MainScene.unity
+116
-11
InvestUIController.cs
Assets/Scripts/InvestUIController.cs
+134
-0
InvestUIController.cs.meta
Assets/Scripts/InvestUIController.cs.meta
+13
-0
ManagementUIController.cs
Assets/Scripts/ManagementUIController.cs
+6
-5
UIManager.cs
Assets/Scripts/UIManager.cs
+1
-0
No files found.
Assets/Scenes/MainScene.unity
View file @
dac4d3d2
...
...
@@ -1276,7 +1276,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
81357633
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeEIValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
-0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&81357633
...
...
@@ -4201,7 +4212,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
371250093
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeLogiValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&371250093
...
...
@@ -7186,7 +7208,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
565059266
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeTaxValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&565059266
...
...
@@ -8248,7 +8281,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
689709125
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeLogiValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
-0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&689709125
...
...
@@ -11543,6 +11587,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
1056054509
}
-
component
:
{
fileID
:
1056054508
}
-
component
:
{
fileID
:
1056054513
}
-
component
:
{
fileID
:
1056054510
}
-
component
:
{
fileID
:
1056054511
}
-
component
:
{
fileID
:
1056054512
}
...
...
@@ -11668,6 +11713,22 @@ MonoBehaviour:
CityBuildingQueue
:
{
fileID
:
1289093026
}
NormalBuildingQueue
:
{
fileID
:
436280704
}
QuestInfo
:
{
fileID
:
2113206554
}
---
!u!114
&1056054513
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1056054507
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fd72f73951899e9439b6d85533d8acc2
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
InvestmentUI
:
{
fileID
:
1649173554
}
Tax
:
{
fileID
:
1692011048
}
EcoInv
:
{
fileID
:
1683759536
}
TechInv
:
{
fileID
:
1313675901
}
Logistics
:
{
fileID
:
2015138313
}
---
!u!1001
&1060029827
Prefab
:
m_ObjectHideFlags
:
0
...
...
@@ -14307,7 +14368,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
1306227885
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeEIValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&1306227885
...
...
@@ -15869,7 +15941,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
640
,
y
:
9
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!114
&1447270535
MonoBehaviour
:
...
...
@@ -16776,7 +16848,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
1544575189
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeTIValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
-0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&1544575189
...
...
@@ -17805,7 +17888,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0.5
,
y
:
1
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
-0.00003027916
}
m_SizeDelta
:
{
x
:
890
,
y
:
9
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
1
}
---
!u!114
&1623971499
MonoBehaviour
:
...
...
@@ -18506,7 +18589,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
890
,
y
:
9
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!114
&1681201288
MonoBehaviour
:
...
...
@@ -19132,7 +19215,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
1714284814
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeTIValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&1714284814
...
...
@@ -23351,7 +23445,18 @@ MonoBehaviour:
m_TargetGraphic
:
{
fileID
:
2122157340
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
-
m_Target
:
{
fileID
:
1056054513
}
m_MethodName
:
ChangeTaxValue
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
-0.01
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&2122157340
...
...
Assets/Scripts/InvestUIController.cs
0 → 100644
View file @
dac4d3d2
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
using
CivModel
;
using
CivModel.Common
;
public
class
InvestUIController
:
MonoBehaviour
{
public
GameObject
InvestmentUI
;
public
GameObject
Tax
;
public
GameObject
EcoInv
;
public
GameObject
TechInv
;
public
GameObject
Logistics
;
private
Slider
taxSlider
;
private
Slider
eiSlider
;
private
Slider
tiSlider
;
private
Slider
logiSlider
;
private
Text
taxRateText
;
private
Text
eiRateText
;
private
Text
tiRateText
;
private
Text
logiRateText
;
private
static
InvestUIController
_IVUIController
;
public
static
InvestUIController
I
{
get
{
return
_IVUIController
;
}
}
// Use this for initialization
void
Awake
()
{
// Singleton
if
(
_IVUIController
!=
null
)
{
Destroy
(
this
);
return
;
}
else
{
_IVUIController
=
this
;
}
// Use this when scene changing exists
// DontDestroyOnLoad(gameObject);
}
void
Start
()
{
taxSlider
=
Tax
.
GetComponentInChildren
<
Slider
>();
eiSlider
=
EcoInv
.
GetComponentInChildren
<
Slider
>();
tiSlider
=
TechInv
.
GetComponentInChildren
<
Slider
>();
logiSlider
=
Logistics
.
GetComponentInChildren
<
Slider
>();
initSlider
();
}
// Update is called once per frame
void
Update
()
{
GameManager
.
I
.
Game
.
PlayerInTurn
.
TaxRate
=
((
double
)((
int
)(
taxSlider
.
value
*
100
)))/
100f
;
GameManager
.
I
.
Game
.
PlayerInTurn
.
EconomicInvestmentRatio
=
((
double
)((
int
)(
eiSlider
.
value
*
100
)))
/
100f
;
GameManager
.
I
.
Game
.
PlayerInTurn
.
ResearchInvestmentRatio
=
((
double
)((
int
)(
tiSlider
.
value
*
100
)))
/
100f
;
GameManager
.
I
.
Game
.
PlayerInTurn
.
RepairInvestmentRatio
=
((
double
)((
int
)(
logiSlider
.
value
*
100
)))
/
100f
;
taxRateText
.
text
=
((
int
)(
taxSlider
.
value
*
100
)).
ToString
()
+
"%"
;
eiRateText
.
text
=
((
int
)(
eiSlider
.
value
*
100
)).
ToString
()
+
"%"
;
tiRateText
.
text
=
((
int
)(
tiSlider
.
value
*
100
)).
ToString
()
+
"%"
;
logiRateText
.
text
=
((
int
)(
logiSlider
.
value
*
100
)).
ToString
()
+
"%"
;
Debug
.
Log
(
GameManager
.
I
.
Game
.
PlayerInTurn
.
TaxRate
);
}
public
void
initSlider
()
{
taxSlider
.
maxValue
=
1f
;
taxSlider
.
minValue
=
0f
;
eiSlider
.
maxValue
=
2f
;
eiSlider
.
minValue
=
0f
;
tiSlider
.
maxValue
=
2f
;
tiSlider
.
minValue
=
0f
;
logiSlider
.
maxValue
=
1f
;
logiSlider
.
minValue
=
0f
;
taxSlider
.
value
=
(
float
)
GameManager
.
I
.
Game
.
PlayerInTurn
.
TaxRate
;
eiSlider
.
value
=
(
float
)
GameManager
.
I
.
Game
.
PlayerInTurn
.
EconomicInvestmentRatio
;
tiSlider
.
value
=
(
float
)
GameManager
.
I
.
Game
.
PlayerInTurn
.
ResearchInvestmentRatio
;
logiSlider
.
value
=
(
float
)
GameManager
.
I
.
Game
.
PlayerInTurn
.
RepairInvestmentRatio
;
Text
[]
texts
=
InvestmentUI
.
GetComponentsInChildren
<
Text
>();
foreach
(
Text
txt
in
texts
)
{
switch
(
txt
.
name
)
{
case
"TRate"
:
taxRateText
=
txt
;
break
;
case
"PIRate"
:
eiRateText
=
txt
;
break
;
case
"TIRate"
:
tiRateText
=
txt
;
break
;
case
"LRate"
:
logiRateText
=
txt
;
break
;
case
"Current PIRate"
:
txt
.
text
=
"100%"
;
break
;
case
"Current TIRate"
:
txt
.
text
=
"100%"
;
break
;
case
"Current LRate"
:
txt
.
text
=
"50%"
;
break
;
}
}
}
public
void
ChangeTaxValue
(
float
adden
)
{
taxSlider
.
value
+=
adden
;
}
public
void
ChangeEIValue
(
float
adden
)
{
eiSlider
.
value
+=
adden
;
}
public
void
ChangeTIValue
(
float
adden
)
{
tiSlider
.
value
+=
adden
;
}
public
void
ChangeLogiValue
(
float
adden
)
{
logiSlider
.
value
+=
adden
;
}
}
Assets/Scripts/InvestUIController.cs.meta
0 → 100644
View file @
dac4d3d2
fileFormatVersion: 2
guid: fd72f73951899e9439b6d85533d8acc2
timeCreated: 1520008093
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/ManagementUIController.cs
View file @
dac4d3d2
...
...
@@ -47,6 +47,7 @@ public class ManagementUIController : MonoBehaviour {
public
GameObject
CityQueue
,
CityBuildingQueue
,
NormalBuildingQueue
;
// Building production
public
GameObject
QuestInfo
;
private
Text
[]
questInfotexts
;
//ManageMentUI 갱신 함수
...
...
@@ -120,7 +121,7 @@ public class ManagementUIController : MonoBehaviour {
DeleteAllSQ
();
foreach
(
IProductionFactory
fac
in
facList
)
{
//여기서 분리
PartSelectionQ
(
EpicQlist
,
EpicQueue
,
fac
);
}
//내용물 없을 때 빈칸 채우기
...
...
@@ -398,11 +399,11 @@ public class ManagementUIController : MonoBehaviour {
}
public
void
SetQuestInfo
(
Quest
qst
)
{
if
(
qst
==
null
)
if
(
qst
==
null
)
{
foreach
(
Text
txt
in
questInfotexts
)
foreach
(
Text
txt
in
questInfotexts
)
{
switch
(
txt
.
name
)
switch
(
txt
.
name
)
{
default
:
txt
.
text
=
""
;
break
;
...
...
@@ -431,7 +432,7 @@ public class ManagementUIController : MonoBehaviour {
txt
.
text
=
"게시 기한 : 영구히"
;
break
;
case
"Deadline"
:
txt
.
text
=
"제한 기한 : "
+
qst
.
LimitTurn
+
"까지"
;
txt
.
text
=
"제한 기한 : "
+
qst
.
LimitTurn
+
"까지"
;
if
(
qst
.
LimitTurn
==
-
1
)
txt
.
text
=
"제한 기한 : 없음"
;
break
;
...
...
Assets/Scripts/UIManager.cs
View file @
dac4d3d2
...
...
@@ -139,6 +139,7 @@ public class UIManager : MonoBehaviour {
SkillSet
.
SetActive
(
false
);
ManagementUI
.
SetActive
(
true
);
uicontroller
.
ManageFunction
();
InvestUIController
.
I
.
initSlider
();
MapUI
.
SetActive
(
false
);
QuestUI
.
SetActive
(
false
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment