Commit 60581ff0 authored by redsuncore's avatar redsuncore

Skill Function Activated

스킬 사용 가능(City settlement)
parent 02877020
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
......@@ -269,9 +269,9 @@ RectTransform:
m_Father: {fileID: 943360799}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000015258789}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -140, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &42516959
......@@ -1813,8 +1813,8 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 2122499626}
m_MethodName: Skill
- m_Target: {fileID: 1096861576}
m_MethodName: SkillButtonMethod
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
......@@ -1893,9 +1893,9 @@ RectTransform:
m_Father: {fileID: 1115068181}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -10}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -140, y: -10}
m_SizeDelta: {x: 280, y: 180}
m_Pivot: {x: 0, y: 1}
--- !u!114 &943360800
......@@ -2085,9 +2085,9 @@ RectTransform:
m_Father: {fileID: 665629348}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -10}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -140, y: -10}
m_SizeDelta: {x: 280, y: 180}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1038595376
......@@ -2255,6 +2255,8 @@ MonoBehaviour:
SkillButton: {fileID: 901706016}
WaitButton: {fileID: 1126363246}
UnitInfo: {fileID: 1474852284}
Actions: {fileID: 0}
TurnEnd: {fileID: 0}
Portrait: {fileID: 109918048}
UnitName: {fileID: 1172741147}
UnitAttack: {fileID: 1442304659}
......@@ -2524,7 +2526,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1126363247}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1096861576}
m_MethodName: WaitButtonMethod
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
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 &1126363247
......@@ -3266,7 +3279,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1727812863}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1096861576}
m_MethodName: AttackButtonMethod
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
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 &1727812863
......@@ -3870,9 +3894,9 @@ RectTransform:
m_Father: {fileID: 1038595375}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0.0000076293945}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -140, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1994927161
......
......@@ -305,6 +305,8 @@ public class CIVGameManager : MonoBehaviour, IView {
}
case CivPresenter.Presenter.States.ProductUI:
{
break;
}
case CivPresenter.Presenter.States.ProductAdd:
......
......@@ -83,7 +83,12 @@ public class TilePrefab : MonoBehaviour {
}
public void BuildDistrict(CivModel.TileBuilding building)
{
BuildDistrict(building?.ToString().Split('.').Last());
if (building == null)
{
BuildDistrict("None");
}
else
BuildDistrict(building?.ToString().Split('.').Last());
}
public void BuildDistrict(string dist)
{
......@@ -95,13 +100,17 @@ public class TilePrefab : MonoBehaviour {
}
public void DrawUnit(CivModel.Unit unit)
{
DrawUnit(unit?.ToString().Split('.').Last());
if(unit == null)
{
DrawUnit("None");
}
else
DrawUnit(unit?.ToString().Split('.').Last());
}
public void DrawUnit(string unit)
{
CIVGameManager.UnitSprite us = CIVGameManager.UnitSprite.None;
Enum.TryParse(unit, out us);
unitSprite = CIVGameManager.UnitSprites[(int)us];
GetComponentsInChildren<SpriteRenderer>()[2].sprite = unitSprite;
}
......
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