Commit 6db2bde4 authored by redsuncore's avatar redsuncore

Model Updated, Quest Pop Up Available

모델 업데이트, 퀘스트 팝업 업데이트. 피노 엔딩 추가. 퀘스트 추가.
parent 580601f1
fileFormatVersion: 2
guid: 06d1e9b94983c2b43b353b6afc3e4574
timeCreated: 1519738849
timeCreated: 1519986380
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 14316eefeff7b8c4882dee9cb31df5f1
timeCreated: 1519738849
timeCreated: 1519986380
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 51a4ccfc53e3bd3489fedcd4adb9e458
timeCreated: 1519738849
timeCreated: 1519986380
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -524,17 +524,22 @@
</member>
<member name="P:CivModel.Game.TurnObservable">
<summary>
An <see cref="T:CivModel.Observable`1"/> which can be observed by <see cref="T:CivModel.ITurnObserver"/>.
An <see cref="T:CivModel.Observable`1"/> object which can be observed by <see cref="T:CivModel.ITurnObserver"/>.
</summary>
</member>
<member name="P:CivModel.Game.TileObjectObservable">
<summary>
An <see cref="T:CivModel.Observable`1"/> which can be observed by <see cref="T:CivModel.ITileObjectObserver"/>.
An <see cref="T:CivModel.Observable`1"/> object which can be observed by <see cref="T:CivModel.ITileObjectObserver"/>.
</summary>
</member>
<member name="P:CivModel.Game.BattleObservable">
<summary>
An <see cref="T:CivModel.Observable`1"/> which can be observed by <see cref="T:CivModel.IBattleObserver"/>.
An <see cref="T:CivModel.Observable`1"/> object which can be observed by <see cref="T:CivModel.IBattleObserver"/>.
</summary>
</member>
<member name="P:CivModel.Game.QuestObservable">
<summary>
An <see cref="T:CivModel.Observable`1"/> object which can be observed by <see cref="T:CivModel.IQuestObserver"/>.
</summary>
</member>
<member name="T:CivModel.GameConstants">
......@@ -1149,6 +1154,31 @@
<exception cref="T:System.InvalidOperationException">production is not completed yet</exception>
<exception cref="T:System.ArgumentException">point is invalid</exception>
</member>
<member name="T:CivModel.IQuestObserver">
<summary>
The interface to observe <see cref="T:CivModel.Quest"/> related events.
</summary>
<seealso cref="T:CivModel.Game"/>
<seealso cref="T:CivModel.Quest"/>
</member>
<member name="M:CivModel.IQuestObserver.QuestAccepted(CivModel.Quest)">
<summary>
Called when quest is accepted.
</summary>
<param name="quest"></param>
</member>
<member name="M:CivModel.IQuestObserver.QuestGivenup(CivModel.Quest)">
<summary>
Called when quest is given up.
</summary>
<param name="quest"></param>
</member>
<member name="M:CivModel.IQuestObserver.QuestCompleted(CivModel.Quest)">
<summary>
Called when quest is completed.
</summary>
<param name="quest"></param>
</member>
<member name="T:CivModel.ITileObjectObserver">
<summary>
The interface to observe <see cref="T:CivModel.TileObject"/> related events.
......
This diff is collapsed.
This diff is collapsed.
fileFormatVersion: 2
guid: c2ef4ebe00b20e942b30e4f5922f3869
timeCreated: 1519992063
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 797af3a8ac5c48f40b14546bb8958aa6
timeCreated: 1519987794
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
......@@ -8,7 +8,7 @@ TextureImporter:
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
......@@ -34,13 +34,13 @@ TextureImporter:
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
......@@ -48,9 +48,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
......@@ -66,6 +66,26 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
......
......@@ -8,7 +8,7 @@ TextureImporter:
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
......@@ -34,13 +34,13 @@ TextureImporter:
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
......@@ -48,9 +48,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
......@@ -66,6 +66,26 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
......
......@@ -8,7 +8,7 @@ TextureImporter:
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
......@@ -34,13 +34,13 @@ TextureImporter:
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
......@@ -48,9 +48,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
......@@ -66,6 +66,26 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
......
......@@ -8,7 +8,7 @@ TextureImporter:
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
......@@ -34,13 +34,13 @@ TextureImporter:
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
......@@ -48,9 +48,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
......@@ -66,6 +66,26 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
......
......@@ -8,7 +8,7 @@ TextureImporter:
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
......@@ -34,13 +34,13 @@ TextureImporter:
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
......@@ -48,9 +48,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
......@@ -66,6 +66,26 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
......
This diff is collapsed.
......@@ -36,6 +36,7 @@ public class GameManager : MonoBehaviour {
// Selected actor
private CivModel.Unit _selectedActor = null;
public CivModel.Unit SelectedActor { get { return _selectedActor; } }
public IQuestObserver QuestObserver;
// Variables from Presenter.cs
public bool isThereTodos;
......@@ -67,6 +68,8 @@ public class GameManager : MonoBehaviour {
// Map tiling
innerRadius = outerRadius * Mathf.Sqrt(3.0f) / 2;
ObserverSet();
DrawMap();
ProceedTurn();
......@@ -347,8 +350,29 @@ public class GameManager : MonoBehaviour {
}
return false;
}
private void ObserverSet()
{
QuestObserver = new CivQuestObserver();
_game.QuestObservable.AddObserver(QuestObserver);
}
}
public class CivQuestObserver : IQuestObserver
{
public void QuestAccepted(Quest quest)
{
return;
}
public void QuestCompleted(Quest quest)
{
UIManager.I.ShowQuestEnd(quest);
}
public void QuestGivenup(Quest quest)
{
return;
}
}
public static class ProductionFactoryTraits
{
public static string GetFactoryName(CivModel.IProductionFactory Factory)
......@@ -356,7 +380,7 @@ public static class ProductionFactoryTraits
char[] sep = { '.' };
string name = Factory.ToString().Split(sep)[2];
string result;
switch(name)
switch (name)
{
case "PioneerProductionFactory":
result = "개척자";
......@@ -413,5 +437,52 @@ public static class ProductionFactoryTraits
}
return result;
}
}
public static class ParseQuest
{
public static string GetQuestName(Quest qst)
{
string rlatmxmfld;
switch (qst.Name)
{
case "개꿀잼 퀘스트":
rlatmxmfld = "hwan_main2";
break;
case "불가사의 - 오티즘 빔 반사 어레이":
rlatmxmfld = "hwan_main1";
break;
case "첩보 - 크툴루 계획":
rlatmxmfld = "hwan_main2";
break;
case "불가사의- 이집트 캉덤":
rlatmxmfld = "hwan_main3";
break;
case "[전쟁 동맹] - 에뮤 연방":
rlatmxmfld = "finno_main1";
break;
case "[불가사의] - 아틀란티스":
rlatmxmfld = "finno_main2";
break;
case "[불가사의] - R'̧l̨̜y͎͎̜̺̬e͕͇͇͚͓̹h̢̳͎̗͇͇̙":
rlatmxmfld = "finno_main3";
break;
case "군사 동맹 - 궤도 장악권":
rlatmxmfld = "hwan_sub1";
break;
case "건물 기증 - 모아이 포스 필드":
rlatmxmfld = "hwan_sub2";
break;
case "불가사의 - 성간 에너지":
rlatmxmfld = "finno_sub1";
break;
case "불가사의 - 유전 연구학":
rlatmxmfld = "finno_sub2";
break;
default:
rlatmxmfld = "hwan_main1";
break;
}
return rlatmxmfld;
}
}
\ No newline at end of file
......@@ -12,7 +12,7 @@ public class UIManager : MonoBehaviour {
public GameObject ManagementUI;
public GameObject QuestUI;
public GameObject GameEND;
public GameObject QuestPopUp;
public Text Gold;
public Text Population;
public Text Happiness;
......@@ -44,6 +44,9 @@ public class UIManager : MonoBehaviour {
public GameObject EpicTab, HighTab, IntermediateTab, LowTab; // Unit production
public GameObject CityTab, CityBuildingTab, NormalBuildingTab; // Building production
public GameObject QuestPopPrefab;
private ManagementUIController uicontroller;
private static UIManager _uimanager;
public static UIManager I { get { return _uimanager; } }
......@@ -246,12 +249,54 @@ public class UIManager : MonoBehaviour {
public void ShowQuestEnd(Quest quest)
{
var Qrefab = Instantiate(QuestPopPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
Qrefab.transform.localScale = new Vector3(1f, 1f, 1f);
Qrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
Button[] buttons = Qrefab.GetComponentsInChildren<Button>();
Image[] images = Qrefab.GetComponentsInChildren<Image>();
Text[] texts = Qrefab.GetComponentsInChildren<Text>();
foreach (Button btn in buttons)
{
switch (btn.name)
{
case "Exit":
btn.onClick.AddListener(delegate { QuestEndEnd(Qrefab); });
break;
default: break;
}
}
foreach (Image img in images)
{
switch (img.name)
{
case "Image":
Debug.Log("Quests/" + ParseQuest.GetQuestName(quest));
img.sprite = Resources.Load(("Quests/" + ParseQuest.GetQuestName(quest)).ToLower(), typeof(Sprite)) as Sprite;
if(img.sprite == null)
{
Debug.Log("아씨바ㅏㅓㅇㄹ넝ㄹㅇㄴㅁㄹ");
}
break;
default: break;
}
}
foreach (Text txt in texts)
{
switch (txt.name)
{
case "RewardNotice":
txt.text = quest.CompleteNotice;
break;
default: break;
}
}
}
public void QuestEndEnd()
public void QuestEndEnd(GameObject Qrefab)
{
QuestPopUp.SetActive(false);
Destroy(Qrefab);
}
//// Management UI (Production Selection) ////
public void UnitSelTabActive()
{
......
Subproject commit d7cbc65360f281391f3c14e5176a3a3b5159b1e2
Subproject commit ac5ef696bdb34f377882f9279e12de1864fe7174
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