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
4dc08df9
Commit
4dc08df9
authored
Jul 05, 2018
by
Seungwon Ju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Camera Works! by 진석
parent
c7c2d4cd
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
4803 additions
and
2187 deletions
+4803
-2187
hextile.prefab
Assets/Prefabs/hextile.prefab
+1750
-1750
unit.prefab
Assets/Prefabs/unit.prefab
+116
-116
unit.prefab.meta
Assets/Prefabs/unit.prefab.meta
+8
-8
Game.unity
Assets/Scenes/Game.unity
+2770
-242
Camera.meta
Assets/Script/Camera.meta
+8
-8
CameraControl.cs
Assets/Script/Camera/CameraControl.cs
+55
-17
CameraControl.cs.meta
Assets/Script/Camera/CameraControl.cs.meta
+11
-11
GameManager.cs.meta
Assets/Script/GameManager.cs.meta
+14
-14
HexTile.cs
Assets/Script/Tile/HexTile.cs
+1
-0
UI.meta
Assets/Script/UI.meta
+1
-1
UIManager.cs
Assets/Script/UI/UIManager.cs
+35
-0
UIManager.cs.meta
Assets/Script/UI/UIManager.cs.meta
+11
-0
Unit.meta
Assets/Script/Unit.meta
+8
-8
Unit.cs
Assets/Script/Unit/Unit.cs
+1
-0
Unit.cs.meta
Assets/Script/Unit/Unit.cs.meta
+11
-11
UnitEnum.cs
Assets/Script/Unit/UnitEnum.cs
+3
-1
No files found.
Assets/Prefabs/hextile.prefab
View file @
4dc08df9
Assets/Prefabs/unit.prefab
View file @
4dc08df9
Assets/Prefabs/unit.prefab.meta
View file @
4dc08df9
Assets/Scenes/Game.unity
View file @
4dc08df9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Assets/Script/Camera.meta
View file @
4dc08df9
Assets/Script/Camera/CameraControl.cs
View file @
4dc08df9
...
...
@@ -9,29 +9,67 @@ public class CameraControl : MonoBehaviour {
private
int
screen_height
=
Screen
.
height
;
private
int
screen_width
=
Screen
.
width
;
int
MaxHeight
=
30
;
//최대 높이
int
MinHeight
=
10
;
//최소 높이
// Use this for initialization
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
if
(
Input
.
GetAxis
(
"Mouse ScrollWheel"
)
<
0
&&
Camera
.
main
.
transform
.
position
.
y
<
150
)
{
// 150 은 추후에 적절히 작은 값으로 수정 필요.
if
(
Input
.
GetAxis
(
"Mouse ScrollWheel"
)
<
0
&&
Camera
.
main
.
transform
.
position
.
y
<
MaxHeight
)
{
Camera
.
main
.
transform
.
Translate
(
0
,
0
,
-
10
);
}
if
(
Input
.
GetAxis
(
"Mouse ScrollWheel"
)
>
0
&&
Camera
.
main
.
transform
.
position
.
y
>
15
)
{
else
if
(
Camera
.
main
.
transform
.
position
.
y
>
MaxHeight
)
{
Camera
.
main
.
transform
.
position
=
new
Vector3
(
Camera
.
main
.
transform
.
position
.
x
,
MaxHeight
,
Camera
.
main
.
transform
.
position
.
z
);
}
if
(
Input
.
GetAxis
(
"Mouse ScrollWheel"
)
>
0
&&
Camera
.
main
.
transform
.
position
.
y
>
MinHeight
)
{
Camera
.
main
.
transform
.
Translate
(
0
,
0
,
10
);
}
else
if
(
Camera
.
main
.
transform
.
position
.
y
<
MinHeight
)
{
Camera
.
main
.
transform
.
position
=
new
Vector3
(
Camera
.
main
.
transform
.
position
.
x
,
MinHeight
,
Camera
.
main
.
transform
.
position
.
z
);
}
if
(
Input
.
mousePosition
.
x
>
screen_width
-
boundary
)
{
Camera
.
main
.
transform
.
Translate
(
2
*
speed
*
Time
.
deltaTime
,
0
,
0
);
if
(
Camera
.
main
.
transform
.
position
.
x
<=
220
)
Camera
.
main
.
transform
.
Translate
(
2
*
speed
*
Time
.
deltaTime
*
Mathf
.
Abs
(
Input
.
mousePosition
.
x
-
(
screen_width
-
boundary
))
*
(
float
)
0.015
,
0
,
0
);
else
Camera
.
main
.
transform
.
position
=
new
Vector3
(
5
,
Camera
.
main
.
transform
.
position
.
y
,
Camera
.
main
.
transform
.
position
.
z
);
}
if
(
Input
.
mousePosition
.
x
<
0
+
boundary
)
{
Camera
.
main
.
transform
.
Translate
(-
2
*
speed
*
Time
.
deltaTime
,
0
,
0
);
if
(
Camera
.
main
.
transform
.
position
.
x
>=
0
)
Camera
.
main
.
transform
.
Translate
(-
2
*
speed
*
Time
.
deltaTime
*
Mathf
.
Abs
(
Input
.
mousePosition
.
x
-
boundary
)
*
(
float
)
0.015
,
0
,
0
);
else
Camera
.
main
.
transform
.
position
=
new
Vector3
(
215
,
Camera
.
main
.
transform
.
position
.
y
,
Camera
.
main
.
transform
.
position
.
z
);
}
if
(
Input
.
mousePosition
.
y
>
screen_height
-
boundary
)
{
Camera
.
main
.
transform
.
Translate
(
0
,
speed
*
Time
.
deltaTime
*
Mathf
.
Sqrt
(
3
),
speed
*
Time
.
deltaTime
);
if
(
Camera
.
main
.
transform
.
position
.
z
<
-
10
-
(
Camera
.
main
.
transform
.
position
.
y
-
10
)
/
Mathf
.
Sqrt
(
3
))
Camera
.
main
.
transform
.
Translate
(
0
,
speed
*
Time
.
deltaTime
*
Mathf
.
Sqrt
(
3
)
*
Mathf
.
Abs
(
Input
.
mousePosition
.
y
-
(
screen_height
-
boundary
))
*
(
float
)
0.015
,
speed
*
Time
.
deltaTime
*
Mathf
.
Abs
(
Input
.
mousePosition
.
y
-
(
screen_height
-
boundary
))
*
(
float
)
0.015
);
}
else
if
(
Camera
.
main
.
transform
.
position
.
z
>
-
10
-
(
Camera
.
main
.
transform
.
position
.
y
-
10
)
/
Mathf
.
Sqrt
(
3
))
Camera
.
main
.
transform
.
position
=
new
Vector3
(
Camera
.
main
.
transform
.
position
.
x
,
Camera
.
main
.
transform
.
position
.
y
,
-
10
-
(
Camera
.
main
.
transform
.
position
.
y
-
10
)
/
Mathf
.
Sqrt
(
3
));
if
(
Input
.
mousePosition
.
y
<
0
+
boundary
)
{
Camera
.
main
.
transform
.
Translate
(
0
,
-
speed
*
Time
.
deltaTime
*
Mathf
.
Sqrt
(
3
),
-
speed
*
Time
.
deltaTime
);
if
(
Camera
.
main
.
transform
.
position
.
z
>
-
120
)
Camera
.
main
.
transform
.
Translate
(
0
,
-
speed
*
Time
.
deltaTime
*
Mathf
.
Sqrt
(
3
)
*
Mathf
.
Abs
(
Input
.
mousePosition
.
y
-
boundary
)
*
(
float
)
0.015
,
-
speed
*
Time
.
deltaTime
*
Mathf
.
Abs
(
Input
.
mousePosition
.
y
-
boundary
)
*
(
float
)
0.015
);
}
else
if
(
Camera
.
main
.
transform
.
position
.
z
<
-
120
)
Camera
.
main
.
transform
.
position
=
new
Vector3
(
Camera
.
main
.
transform
.
position
.
x
,
Camera
.
main
.
transform
.
position
.
y
,
-
120
);
}
}
Assets/Script/Camera/CameraControl.cs.meta
View file @
4dc08df9
Assets/Script/GameManager.cs.meta
View file @
4dc08df9
Assets/Script/Tile/HexTile.cs
View file @
4dc08df9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
CivModel
;
public
class
HexTile
:
MonoBehaviour
...
...
Assets/Script/UI.meta
View file @
4dc08df9
fileFormatVersion: 2
guid:
a9a4dbc34bad0dc4eb1302dc4646729d
guid:
d9c203eade061484ea0fe0f615a83955
folderAsset: yes
DefaultImporter:
externalObjects: {}
...
...
Assets/Script/UI/UIManager.cs
0 → 100644
View file @
4dc08df9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
CivModel
;
public
class
UIManager
:
MonoBehaviour
{
GameObject
mapUI
;
// Use this for initialization
void
Start
()
{
mapUI
=
GameObject
.
Find
(
"MapUI"
);
}
// Update is called once per frame
void
Update
()
{
}
public
void
onClick
(
GameObject
go
)
{
if
(
go
.
activeSelf
==
false
)
{
go
.
SetActive
(
true
);
if
(
go
!=
mapUI
)
mapUI
.
SetActive
(
false
);
}
else
{
go
.
SetActive
(
false
);
if
(
go
!=
mapUI
)
mapUI
.
SetActive
(
true
);
}
}
}
Assets/Script/UI/UIManager.cs.meta
0 → 100644
View file @
4dc08df9
fileFormatVersion: 2
guid: 022491211cd651a4c92de28671373b2b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Script/Unit.meta
View file @
4dc08df9
Assets/Script/Unit/Unit.cs
View file @
4dc08df9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
CivModel
;
public
class
Unit
:
MonoBehaviour
{
...
...
Assets/Script/Unit/Unit.cs.meta
View file @
4dc08df9
Assets/Script/Unit/UnitEnum.cs
View file @
4dc08df9
public
enum
Units
{
using
CivModel
;
public
enum
Units
{
HwanPioneer
,
HwanBrainwashedEmuKnight
,
HwanDecentralizedMilitary
,
...
...
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