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
dfbc0ae0
Commit
dfbc0ae0
authored
Jan 24, 2018
by
16홍선우
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefabs added in ManagementUIController
parent
d84f4091
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
+27
-20
ManagementUIController.cs
Assets/Scripts/ManagementUIController.cs
+27
-20
No files found.
Assets/Scripts/ManagementUIController.cs
View file @
dfbc0ae0
...
...
@@ -20,8 +20,11 @@ public class ManagementUIController : MonoBehaviour {
private
CIVGameManager
gameManager
;
private
Presenter
mPresenter
;
public
Transform
newProduction
;
public
Transform
newPlacement
;
// prefabs
public
GameObject
[]
PQlist
;
public
GameObject
[]
DQlist
;
public
GameObject
proPrefab
;
public
GameObject
depPrefab
;
// prefab templates
public
Button
pioneer
;
// new unit production when clicked
public
void
setControlUI
()
...
...
@@ -32,23 +35,6 @@ public class ManagementUIController : MonoBehaviour {
managementUI
.
gameObject
.
SetActive
(
false
);
}
public
void
productionQ
(
CivModel
.
Production
produce
)
{
if
(
pioneer
==
true
)
{
Instantiate
(
newProduction
);
}
if
(
produce
.
Completed
==
true
)
Destroy
(
newProduction
);
}
public
void
placementQ
(
CivModel
.
Production
produce
)
{
if
(
produce
.
Completed
==
true
)
Instantiate
(
newPlacement
);
}
void
Start
()
{
...
...
@@ -57,9 +43,30 @@ public class ManagementUIController : MonoBehaviour {
mPresenter
=
gameManager
.
GetPresenter
();
}
void
Update
()
void
Update
()
{
mProduction
=
mPlayer
.
Production
;
// The list of the not-finished productions of this player
mDeployment
=
mPlayer
.
Deployment
;
// The list of the ready-to-deploy productions of this player
}
public
void
productionQ
()
{
for
(
int
i
=
0
;
i
<
mProduction
.
Count
;
i
++)
{
PQlist
[
i
]
=
Instantiate
(
proPrefab
)
as
GameObject
;
PQlist
[
i
].
GetComponent
<
Text
>().
text
=
3
+
"턴 이후 종료"
;
// need to calculate how many turns are left
}
}
public
void
deploymentQ
()
{
for
(
int
i
=
0
;
i
<
mDeployment
.
Count
;
i
++)
{
DQlist
[
i
]
=
Instantiate
(
depPrefab
)
as
GameObject
;
}
}
}
\ No newline at end of file
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