Commit dac4d3d2 authored by redsuncore's avatar redsuncore

ManagementUI Completed. (Investment UI Activated)

내정 UI 활성화. 세율, 투자, 병참 조절가능.
parent 490850c2
...@@ -1276,7 +1276,18 @@ MonoBehaviour: ...@@ -1276,7 +1276,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 81357633} m_TargetGraphic: {fileID: 81357633}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &81357633 --- !u!114 &81357633
...@@ -4201,7 +4212,18 @@ MonoBehaviour: ...@@ -4201,7 +4212,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 371250093} m_TargetGraphic: {fileID: 371250093}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &371250093 --- !u!114 &371250093
...@@ -7186,7 +7208,18 @@ MonoBehaviour: ...@@ -7186,7 +7208,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 565059266} m_TargetGraphic: {fileID: 565059266}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &565059266 --- !u!114 &565059266
...@@ -8248,7 +8281,18 @@ MonoBehaviour: ...@@ -8248,7 +8281,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 689709125} m_TargetGraphic: {fileID: 689709125}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &689709125 --- !u!114 &689709125
...@@ -11543,6 +11587,7 @@ GameObject: ...@@ -11543,6 +11587,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1056054509} - component: {fileID: 1056054509}
- component: {fileID: 1056054508} - component: {fileID: 1056054508}
- component: {fileID: 1056054513}
- component: {fileID: 1056054510} - component: {fileID: 1056054510}
- component: {fileID: 1056054511} - component: {fileID: 1056054511}
- component: {fileID: 1056054512} - component: {fileID: 1056054512}
...@@ -11668,6 +11713,22 @@ MonoBehaviour: ...@@ -11668,6 +11713,22 @@ MonoBehaviour:
CityBuildingQueue: {fileID: 1289093026} CityBuildingQueue: {fileID: 1289093026}
NormalBuildingQueue: {fileID: 436280704} NormalBuildingQueue: {fileID: 436280704}
QuestInfo: {fileID: 2113206554} 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 --- !u!1001 &1060029827
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -14307,7 +14368,18 @@ MonoBehaviour: ...@@ -14307,7 +14368,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1306227885} m_TargetGraphic: {fileID: 1306227885}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &1306227885 --- !u!114 &1306227885
...@@ -15869,7 +15941,7 @@ RectTransform: ...@@ -15869,7 +15941,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 640, y: 90} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &1447270535 --- !u!114 &1447270535
MonoBehaviour: MonoBehaviour:
...@@ -16776,7 +16848,18 @@ MonoBehaviour: ...@@ -16776,7 +16848,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1544575189} m_TargetGraphic: {fileID: 1544575189}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &1544575189 --- !u!114 &1544575189
...@@ -17805,7 +17888,7 @@ RectTransform: ...@@ -17805,7 +17888,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -0.00003027916} m_AnchoredPosition: {x: 0, y: -0.00003027916}
m_SizeDelta: {x: 890, y: 90} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1623971499 --- !u!114 &1623971499
MonoBehaviour: MonoBehaviour:
...@@ -18506,7 +18589,7 @@ RectTransform: ...@@ -18506,7 +18589,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 890, y: 90} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &1681201288 --- !u!114 &1681201288
MonoBehaviour: MonoBehaviour:
...@@ -19132,7 +19215,18 @@ MonoBehaviour: ...@@ -19132,7 +19215,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1714284814} m_TargetGraphic: {fileID: 1714284814}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &1714284814 --- !u!114 &1714284814
...@@ -23351,7 +23445,18 @@ MonoBehaviour: ...@@ -23351,7 +23445,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 2122157340} m_TargetGraphic: {fileID: 2122157340}
m_OnClick: m_OnClick:
m_PersistentCalls: 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, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &2122157340 --- !u!114 &2122157340
......
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;
}
}
fileFormatVersion: 2
guid: fd72f73951899e9439b6d85533d8acc2
timeCreated: 1520008093
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -47,6 +47,7 @@ public class ManagementUIController : MonoBehaviour { ...@@ -47,6 +47,7 @@ public class ManagementUIController : MonoBehaviour {
public GameObject CityQueue, CityBuildingQueue, NormalBuildingQueue; // Building production public GameObject CityQueue, CityBuildingQueue, NormalBuildingQueue; // Building production
public GameObject QuestInfo; public GameObject QuestInfo;
private Text[] questInfotexts; private Text[] questInfotexts;
//ManageMentUI 갱신 함수 //ManageMentUI 갱신 함수
...@@ -120,7 +121,7 @@ public class ManagementUIController : MonoBehaviour { ...@@ -120,7 +121,7 @@ public class ManagementUIController : MonoBehaviour {
DeleteAllSQ(); DeleteAllSQ();
foreach (IProductionFactory fac in facList) foreach (IProductionFactory fac in facList)
{ {
//여기서 분리
PartSelectionQ(EpicQlist, EpicQueue, fac); PartSelectionQ(EpicQlist, EpicQueue, fac);
} }
//내용물 없을 때 빈칸 채우기 //내용물 없을 때 빈칸 채우기
...@@ -398,11 +399,11 @@ public class ManagementUIController : MonoBehaviour { ...@@ -398,11 +399,11 @@ public class ManagementUIController : MonoBehaviour {
} }
public void SetQuestInfo(Quest qst) 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 = ""; default: txt.text = "";
break; break;
...@@ -431,7 +432,7 @@ public class ManagementUIController : MonoBehaviour { ...@@ -431,7 +432,7 @@ public class ManagementUIController : MonoBehaviour {
txt.text = "게시 기한 : 영구히"; txt.text = "게시 기한 : 영구히";
break; break;
case "Deadline": case "Deadline":
txt.text = "제한 기한 : " + qst.LimitTurn +"까지"; txt.text = "제한 기한 : " + qst.LimitTurn + "까지";
if (qst.LimitTurn == -1) if (qst.LimitTurn == -1)
txt.text = "제한 기한 : 없음"; txt.text = "제한 기한 : 없음";
break; break;
......
...@@ -139,6 +139,7 @@ public class UIManager : MonoBehaviour { ...@@ -139,6 +139,7 @@ public class UIManager : MonoBehaviour {
SkillSet.SetActive(false); SkillSet.SetActive(false);
ManagementUI.SetActive(true); ManagementUI.SetActive(true);
uicontroller.ManageFunction(); uicontroller.ManageFunction();
InvestUIController.I.initSlider();
MapUI.SetActive(false); MapUI.SetActive(false);
QuestUI.SetActive(false); QuestUI.SetActive(false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment