Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
igem-quantifly
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
PLN
igem-quantifly
Commits
216c4891
Commit
216c4891
authored
Oct 25, 2016
by
Raphael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
b4743506
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Main.unity
Assets/Scenes/Main.unity
+0
-0
GameController.cs
Assets/Scripts/GameController.cs
+1
-6
UIController.cs
Assets/Scripts/UIController.cs
+11
-0
No files found.
Assets/Scenes/Main.unity
View file @
216c4891
No preview for this file type
Assets/Scripts/GameController.cs
View file @
216c4891
...
...
@@ -32,14 +32,10 @@ namespace Assets.Scripts
Screen
.
height
,
0
)).
x
;
var
leftBorder
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
0
,
0
,
0
)).
x
;
if
(!(
rightBorder
>
(
size
.
x
*
mult
)
-
2
))
return
;
if
(!(
rightBorder
>
(
size
.
x
*
mult
)
-
5
))
return
;
BG
=
(
GameObject
)
Instantiate
(
BG
,
new
Vector3
(
size
.
x
+
tra
.
position
.
x
-
.
5f
,
tra
.
position
.
y
,
0
),
Quaternion
.
identity
);
tra
=
BG
.
GetComponent
<
Transform
>();
mult
++;
// _ca.Step(rightBorder);
// DrawMap(leftBorder, rightBorder);
// Debug.Log(_map);
}
}
}
\ No newline at end of file
Assets/Scripts/UIController.cs
View file @
216c4891
...
...
@@ -39,8 +39,19 @@ public class UIController : MonoBehaviour
NbVials
.
text
=
_player
.
NbVials
.
ToString
();
DisplayBattery
();
HandlePowerUps
();
}
private
void
HandlePowerUps
()
{
if
(
_player
.
NbVials
>=
5
)
Vial1
.
enabled
=
true
;
if
(
_player
.
NbVials
>=
10
)
Vial2
.
enabled
=
true
;
if
(
_player
.
NbVials
>=
15
)
Vial3
.
enabled
=
true
;
}
private
void
DisplayBattery
()
{
Battery
.
sprite
=
BatteryImages
[
_player
.
Battery
/
8
];
...
...
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