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
fae78858
Commit
fae78858
authored
Feb 28, 2018
by
redsuncore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Victory Updated
승리 화면 구현(Hwan) Scene변경됨
parent
08d9a1c4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
425 additions
and
98 deletions
+425
-98
Endings.meta
Assets/Resources/Endings.meta
+10
-0
Hwan_ending.png
Assets/Resources/Endings/Hwan_ending.png
+0
-0
Hwan_ending.png.meta
Assets/Resources/Endings/Hwan_ending.png.meta
+97
-0
MainScene.unity
Assets/Scenes/MainScene.unity
+225
-20
GameManager.cs
Assets/Scripts/GameManager.cs
+71
-69
PseudoFSM.cs
Assets/Scripts/PseudoFSM.cs
+4
-4
UIManager.cs
Assets/Scripts/UIManager.cs
+17
-4
civiii-model-proto
civiii-model-proto
+1
-1
No files found.
Assets/Resources/Endings.meta
0 → 100644
View file @
fae78858
fileFormatVersion: 2
guid: 252cb97698365f04a9c61ac47be327ac
folderAsset: yes
timeCreated: 1519812808
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Resources/Endings/Hwan_ending.png
0 → 100644
View file @
fae78858
This diff is collapsed.
Click to expand it.
Assets/Resources/Endings/Hwan_ending.png.meta
0 → 100644
View file @
fae78858
fileFormatVersion: 2
guid: cad9da4b15425b94bbad0635ccea2373
timeCreated: 1519813318
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:
Assets/Scenes/MainScene.unity
View file @
fae78858
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_IndirectSpecularColor
:
{
r
:
0.446578
44
,
g
:
0.49641222
,
b
:
0.57481694
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.446578
98
,
g
:
0.4964133
,
b
:
0.5748178
,
a
:
1
}
---
!u!157
&3
LightmapSettings
:
m_ObjectHideFlags
:
0
...
...
@@ -77,15 +77,18 @@ LightmapSettings:
m_PVRDirectSampleCount
:
32
m_PVRSampleCount
:
500
m_PVRBounces
:
2
m_PVRFiltering
:
0
m_PVRFilterTypeDirect
:
0
m_PVRFilterTypeIndirect
:
0
m_PVRFilterTypeAO
:
0
m_PVRFilteringMode
:
1
m_PVRCulling
:
1
m_PVRFilteringGaussRadiusDirect
:
1
m_PVRFilteringGaussRadiusIndirect
:
5
m_PVRFilteringGaussRadiusAO
:
2
m_PVRFilteringAtrousColorSigma
:
1
m_PVRFilteringAtrousNormalSigma
:
1
m_PVRFilteringAtrousPositionSigma
:
1
m_PVRFilteringAtrousPositionSigmaDirect
:
0.5
m_PVRFilteringAtrousPositionSigmaIndirect
:
2
m_PVRFilteringAtrousPositionSigmaAO
:
1
m_ShowResolutionOverlay
:
1
m_LightingDataAsset
:
{
fileID
:
0
}
m_UseShadowmask
:
1
---
!u!196
&4
...
...
@@ -107,6 +110,8 @@ NavMeshSettings:
manualTileSize
:
0
tileSize
:
256
accuratePlacement
:
0
debug
:
m_Flags
:
0
m_NavMeshData
:
{
fileID
:
0
}
---
!u!1
&22912418
GameObject
:
...
...
@@ -1183,20 +1188,6 @@ Light:
m_Lightmapping
:
4
m_AreaSize
:
{
x
:
1
,
y
:
1
}
m_BounceIntensity
:
1
m_FalloffTable
:
m_Table[0]
:
0
m_Table[1]
:
0
m_Table[2]
:
0
m_Table[3]
:
0
m_Table[4]
:
0
m_Table[5]
:
0
m_Table[6]
:
0
m_Table[7]
:
0
m_Table[8]
:
0
m_Table[9]
:
0
m_Table[10]
:
0
m_Table[11]
:
0
m_Table[12]
:
0
m_ColorTemperature
:
6570
m_UseColorTemperature
:
0
m_ShadowRadius
:
0
...
...
@@ -1624,6 +1615,76 @@ MonoBehaviour:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!1
&108006610
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
108006611
}
-
component
:
{
fileID
:
108006613
}
-
component
:
{
fileID
:
108006612
}
m_Layer
:
5
m_Name
:
GameEND
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
---
!u!224
&108006611
RectTransform
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
108006610
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
1039254077
}
-
{
fileID
:
1361429751
}
m_Father
:
{
fileID
:
1848011628
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&108006612
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
108006610
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
-765806418
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
0.392
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite
:
{
fileID
:
10907
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_Type
:
1
m_PreserveAspect
:
0
m_FillCenter
:
1
m_FillMethod
:
4
m_FillAmount
:
1
m_FillClockwise
:
1
m_FillOrigin
:
0
---
!u!222
&108006613
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
108006610
}
---
!u!1
&109019031
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -11341,11 +11402,11 @@ Camera:
m_TargetEye
:
3
m_HDR
:
1
m_AllowMSAA
:
1
m_AllowDynamicResolution
:
0
m_ForceIntoRT
:
0
m_OcclusionCulling
:
1
m_StereoConvergence
:
10
m_StereoSeparation
:
0.022
m_StereoMirrorMode
:
0
---
!u!4
&1006940700
Transform
:
m_ObjectHideFlags
:
0
...
...
@@ -11675,6 +11736,74 @@ CanvasRenderer:
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1030154599
}
---
!u!1
&1039254076
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
1039254077
}
-
component
:
{
fileID
:
1039254079
}
-
component
:
{
fileID
:
1039254078
}
m_Layer
:
5
m_Name
:
Image
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&1039254077
RectTransform
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1039254076
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
108006611
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.02
,
y
:
0.02
}
m_AnchorMax
:
{
x
:
0.98
,
y
:
0.98
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1039254078
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1039254076
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
-765806418
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite
:
{
fileID
:
21300000
,
guid
:
cad9da4b15425b94bbad0635ccea2373
,
type
:
3
}
m_Type
:
0
m_PreserveAspect
:
0
m_FillCenter
:
1
m_FillMethod
:
4
m_FillAmount
:
1
m_FillClockwise
:
1
m_FillOrigin
:
0
---
!u!222
&1039254079
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1039254076
}
---
!u!1
&1042980214
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -11862,6 +11991,7 @@ MonoBehaviour:
MapUI
:
{
fileID
:
531803464
}
ManagementUI
:
{
fileID
:
687281509
}
QuestUI
:
{
fileID
:
1243551243
}
GameEND
:
{
fileID
:
108006610
}
Gold
:
{
fileID
:
520572089
}
Population
:
{
fileID
:
1776750191
}
Happiness
:
{
fileID
:
79311831
}
...
...
@@ -15463,6 +15593,80 @@ CanvasRenderer:
type
:
2
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1347395341
}
---
!u!1
&1361429750
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
1361429751
}
-
component
:
{
fileID
:
1361429753
}
-
component
:
{
fileID
:
1361429752
}
m_Layer
:
5
m_Name
:
Text
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&1361429751
RectTransform
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1361429750
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
108006611
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
432.5
}
m_SizeDelta
:
{
x
:
300
,
y
:
200
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1361429752
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1361429750
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
708705254
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
0.9044118
,
g
:
0.7792985
,
b
:
0.07980106
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
60
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
0
m_MaxSize
:
60
m_Alignment
:
4
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
"
\uC2B9\uB9AC
"
---
!u!222
&1361429753
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1361429750
}
---
!u!1
&1365235308
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -20692,6 +20896,7 @@ RectTransform:
m_LocalScale
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_Children
:
-
{
fileID
:
367162933
}
-
{
fileID
:
108006611
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
Assets/Scripts/GameManager.cs
View file @
fae78858
...
...
@@ -42,8 +42,6 @@ public class GameManager : MonoBehaviour {
private
CivModel
.
Unit
[]
_standbyUnits
;
private
int
_standbyUnitIndex
=
-
1
;
private
bool
[]
_victoryNotified
=
null
;
// Use this for initialization
void
Awake
()
{
...
...
@@ -82,92 +80,98 @@ public class GameManager : MonoBehaviour {
Debug
.
Log
(
"Happ:"
+
_game
.
PlayerInTurn
.
Happiness
);
Debug
.
Log
(
"Prod:"
+
_game
.
PlayerInTurn
.
Labor
);
Debug
.
Log
(
"Tech:"
+
_game
.
PlayerInTurn
.
Research
);
if
(
Input
.
GetKeyDown
(
KeyCode
.
Space
))
if
(
CheckVictory
())
{
Focus
();
UIManager
.
I
.
GameEnd
();
}
if
(
Input
.
GetMouseButtonDown
(
0
)
&&
!
EventSystem
.
current
.
IsPointerOverGameObject
())
else
{
Ray
ray
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
RaycastHit
hit
;
if
(
Input
.
GetKeyDown
(
KeyCode
.
Space
))
{
Focus
();
}
if
(
Physics
.
Raycast
(
ray
,
out
hit
))
if
(
Input
.
GetMouseButtonDown
(
0
)
&&
!
EventSystem
.
current
.
IsPointerOverGameObject
(
))
{
HexTile
tile
=
hit
.
collider
.
gameObject
.
GetComponent
<
HexTile
>();
Ray
ray
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
RaycastHit
hit
;
if
(
P
seudoFSM
.
I
.
MoveState
)
if
(
P
hysics
.
Raycast
(
ray
,
out
hit
)
)
{
if
(
tile
.
isFlickering
)
HexTile
tile
=
hit
.
collider
.
gameObject
.
GetComponent
<
HexTile
>();
if
(
PseudoFSM
.
I
.
MoveState
)
{
//공격 가능한 놈이 있을 때
if
(
SelectedActor
.
MovingAttackAct
!=
null
&&
SelectedActor
.
MovingAttackAct
.
IsActable
(
tile
.
point
))
{
SelectedActor
.
MovingAttackAct
.
Act
(
tile
.
point
);
PseudoFSM
.
I
.
NormalStateEnter
();
}
else
if
(
tile
.
isFlickering
)
{
Move
(
tile
.
point
);
//공격 가능한 놈이 있을 때
if
(
SelectedActor
.
MovingAttackAct
!=
null
&&
SelectedActor
.
MovingAttackAct
.
IsActable
(
tile
.
point
))
{
SelectedActor
.
MovingAttackAct
.
Act
(
tile
.
point
);
PseudoFSM
.
I
.
NormalStateEnter
();
}
else
{
Move
(
tile
.
point
);
}
}
}
}
if
(
PseudoFSM
.
I
.
DepState
)
{
if
(
tile
.
isFlickering
)
if
(
PseudoFSM
.
I
.
DepState
)
{
Deploy
(
tile
.
point
,
PseudoFSM
.
I
.
Deployment
);
if
(
tile
.
isFlickering
)
{
Deploy
(
tile
.
point
,
PseudoFSM
.
I
.
Deployment
);
}
else
PseudoFSM
.
I
.
NormalStateEnter
();
}
else
PseudoFSM
.
I
.
NormalStateEnter
();
}
if
(
PseudoFSM
.
I
.
AttackState
)
{
if
(
tile
.
isFlickering
)
if
(
PseudoFSM
.
I
.
AttackState
)
{
if
(
SelectedActor
.
HoldingAttackAct
!=
null
&&
SelectedActor
.
HoldingAttackAct
.
IsActable
(
tile
.
point
)
)
if
(
tile
.
isFlickering
)
{
SelectedActor
.
HoldingAttackAct
.
Act
(
tile
.
point
);
PseudoFSM
.
I
.
NormalStateEnter
();
if
(
SelectedActor
.
HoldingAttackAct
!=
null
&&
SelectedActor
.
HoldingAttackAct
.
IsActable
(
tile
.
point
))
{
SelectedActor
.
HoldingAttackAct
.
Act
(
tile
.
point
);
PseudoFSM
.
I
.
NormalStateEnter
();
}
else
{
////Debug.Log("잘못된 공격 대상");
PseudoFSM
.
I
.
NormalStateEnter
();
}
}
else
{
////Debug.Log("잘못된 공격 대상");
PseudoFSM
.
I
.
NormalStateEnter
();
}
}
else
PseudoFSM
.
I
.
NormalStateEnter
();
}
Unit
unit
=
tile
.
point
.
Unit
;
if
(
unit
!=
null
)
{
SelectUnit
(
unit
);
Unit
unit
=
tile
.
point
.
Unit
;
if
(
unit
!=
null
)
{
SelectUnit
(
unit
);
}
}
}
}
// Camera movement
Vector3
mousePos
=
Input
.
mousePosition
;
if
(
mousePos
.
x
<
10
)
{
CameraMove
(
Vector3
.
left
);
}
else
if
(
mousePos
.
x
>
Screen
.
width
-
10
)
{
CameraMove
(
Vector3
.
right
);
}
if
(
mousePos
.
y
<
10
)
{
CameraMove
(
Vector3
.
back
);
}
else
if
(
mousePos
.
y
>
Screen
.
height
-
10
)
{
CameraMove
(
Vector3
.
forward
);
}
// Camera movement
Vector3
mousePos
=
Input
.
mousePosition
;
if
(
mousePos
.
x
<
10
)
{
CameraMove
(
Vector3
.
left
);
}
else
if
(
mousePos
.
x
>
Screen
.
width
-
10
)
{
CameraMove
(
Vector3
.
right
);
}
if
(
mousePos
.
y
<
10
)
{
CameraMove
(
Vector3
.
back
);
}
else
if
(
mousePos
.
y
>
Screen
.
height
-
10
)
{
CameraMove
(
Vector3
.
forward
);
}
CameraZoom
();
CameraZoom
();
}
}
// Instantiate hex tiles
...
...
@@ -322,6 +326,7 @@ public class GameManager : MonoBehaviour {
{
_selectedActor
.
MoveAct
.
Act
(
point
);
PseudoFSM
.
I
.
NormalStateEnter
();
UIManager
.
I
.
MakeUnitInfo
();
}
void
Deploy
(
CivModel
.
Terrain
.
Point
point
,
Production
dep
)
...
...
@@ -329,17 +334,14 @@ public class GameManager : MonoBehaviour {
dep
.
Place
(
point
);
Game
.
PlayerInTurn
.
Deployment
.
Remove
(
dep
);
PseudoFSM
.
I
.
NormalStateEnter
();
UIManager
.
I
.
MakeUnitInfo
();
}
//승리 확인 함수(From Presenter)
private
bool
CheckVictory
()
{
if
(
_victoryNotified
!=
null
)
return
false
;
var
survivors
=
Game
.
Players
.
Where
(
player
=>
!
player
.
IsDefeated
);
if
(
survivors
.
Count
()
<=
1
)
{
_victoryNotified
=
new
bool
[
Game
.
Players
.
Count
];
PseudoFSM
.
I
.
NormalStateEnter
();
return
true
;
}
...
...
Assets/Scripts/PseudoFSM.cs
View file @
fae78858
...
...
@@ -69,15 +69,15 @@ public class PseudoFSM : MonoBehaviour {
_parameterPoints
=
GameManager
.
I
.
SelectedActor
.
PlacedPoint
.
Value
.
Adjacents
();
for
(
int
i
=
0
;
i
<
_parameterPoints
.
Length
;
i
++)
{
if
(
GameManager
.
I
.
SelectedActor
.
Mov
e
Act
.
IsActable
(
_parameterPoints
[
i
]))
if
(
GameManager
.
I
.
SelectedActor
.
Mov
ingAttack
Act
.
IsActable
(
_parameterPoints
[
i
]))
{
CivModel
.
Position
pos
=
_parameterPoints
[
i
].
Value
.
Position
;
GameManager
.
I
.
Cells
[
pos
.
X
,
pos
.
Y
].
GetComponent
<
HexTile
>().
Flicker
Blue
();
GameManager
.
I
.
Cells
[
pos
.
X
,
pos
.
Y
].
GetComponent
<
HexTile
>().
Flicker
Red
();
}
else
if
(
GameManager
.
I
.
SelectedActor
.
Mov
ingAttack
Act
.
IsActable
(
_parameterPoints
[
i
]))
else
if
(
GameManager
.
I
.
SelectedActor
.
Mov
e
Act
.
IsActable
(
_parameterPoints
[
i
]))
{
CivModel
.
Position
pos
=
_parameterPoints
[
i
].
Value
.
Position
;
GameManager
.
I
.
Cells
[
pos
.
X
,
pos
.
Y
].
GetComponent
<
HexTile
>().
Flicker
Red
();
GameManager
.
I
.
Cells
[
pos
.
X
,
pos
.
Y
].
GetComponent
<
HexTile
>().
Flicker
Blue
();
}
}
}
...
...
Assets/Scripts/UIManager.cs
View file @
fae78858
...
...
@@ -9,6 +9,7 @@ public class UIManager : MonoBehaviour {
public
GameObject
MapUI
;
public
GameObject
ManagementUI
;
public
GameObject
QuestUI
;
public
GameObject
GameEND
;
public
Text
Gold
;
public
Text
Population
;
...
...
@@ -84,12 +85,15 @@ public class UIManager : MonoBehaviour {
Gold
.
text
=
"금 : "
+
GameManager
.
I
.
Game
.
PlayerInTurn
.
Gold
+
"(+"
+
GameManager
.
I
.
Game
.
PlayerInTurn
.
GoldIncome
+
")"
;
Population
.
text
=
"인구 : "
+
GameManager
.
I
.
Game
.
PlayerInTurn
.
Population
;
Happiness
.
text
=
"행복 : "
+
GameManager
.
I
.
Game
.
PlayerInTurn
.
Happiness
;
Technology
.
text
=
"기술력 : "
;
// Model 업데이트 이후 어디서 찾아야 하는지 찾을 필요성 있음.
Technology
.
text
=
"기술력 : "
+
GameManager
.
I
.
Game
.
PlayerInTurn
.
Research
;
Labor
.
text
=
"노동력 : "
+
GameManager
.
I
.
Game
.
PlayerInTurn
.
Labor
;
if
(
GameManager
.
I
.
SelectedActor
!=
null
)
}
public
void
MakeUnitInfo
()
{
if
(
GameManager
.
I
.
SelectedActor
!=
null
)
{
UnitInfo
.
SetActive
(
true
);
//UnitPortrait.sprite = Resources.Load<Sprite>("Hwan Units/Portraits/hwan_jedi.png");
UnitName
.
text
=
ProductionFactoryTraits
.
GetName
(
GameManager
.
I
.
SelectedActor
);
UnitAttack
.
text
=
GameManager
.
I
.
SelectedActor
.
AttackPower
.
ToString
();
UnitDefence
.
text
=
GameManager
.
I
.
SelectedActor
.
DefencePower
.
ToString
();
...
...
@@ -106,7 +110,6 @@ public class UIManager : MonoBehaviour {
ActionPoint
.
text
=
""
;
}
}
//// Resource bar UI ////
public
void
MapUIActive
()
// Map UI tab
{
...
...
@@ -114,6 +117,13 @@ public class UIManager : MonoBehaviour {
ManagementUI
.
SetActive
(
false
);
QuestUI
.
SetActive
(
false
);
}
public
void
GameEnd
()
// Map UI tab
{
GameEND
.
SetActive
(
true
);
ManagementUI
.
SetActive
(
false
);
QuestUI
.
SetActive
(
false
);
MapUI
.
SetActive
(
false
);
}
public
void
ManagementUIActive
()
// Management UI tab
{
SkillSet
.
SetActive
(
false
);
...
...
@@ -217,14 +227,17 @@ public class UIManager : MonoBehaviour {
if
(
GameManager
.
I
.
isThereTodos
&&
!
PseudoFSM
.
I
.
DepState
)
{
GameManager
.
I
.
SelectNextUnit
();
MakeUnitInfo
();
}
else
if
(
PseudoFSM
.
I
.
DepState
)
{
PseudoFSM
.
I
.
NormalStateEnter
();
MakeUnitInfo
();
}
else
{
GameManager
.
I
.
ProceedTurn
();
MakeUnitInfo
();
}
}
...
...
civiii-model-proto
@
d7cbc653
Subproject commit
2dbfb44eb8fb492c9d67f0f6798422aaf1e42a1c
Subproject commit
d7cbc65360f281391f3c14e5176a3a3b5159b1e2
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