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
fab7144d
Commit
fab7144d
authored
Oct 27, 2016
by
Naliwe GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added scores menu
parent
a08b183d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
13 deletions
+10
-13
Main.unity
Assets/Scenes/Main.unity
+0
-0
Win.unity
Assets/Scenes/Win.unity
+0
-0
Win.unity.meta
Assets/Scenes/Win.unity.meta
+0
-8
Server.cs
Assets/Scripts/API/Server.cs
+4
-2
Menu.cs
Assets/Scripts/Menu.cs
+5
-0
Player.cs
Assets/Scripts/Player.cs
+1
-3
No files found.
Assets/Scenes/Main.unity
View file @
fab7144d
No preview for this file type
Assets/Scenes/Win.unity
deleted
100644 → 0
View file @
a08b183d
File deleted
Assets/Scenes/Win.unity.meta
deleted
100644 → 0
View file @
a08b183d
fileFormatVersion: 2
guid: 7d2eeb02c17ea7447842a1ccbba338a9
timeCreated: 1477408964
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/API/Server.cs
View file @
fab7144d
...
@@ -12,6 +12,8 @@ namespace Assets.Scripts.API
...
@@ -12,6 +12,8 @@ namespace Assets.Scripts.API
public
static
string
HOST_PROD
=
"https://quantifly.plnech.fr"
;
public
static
string
HOST_PROD
=
"https://quantifly.plnech.fr"
;
public
static
string
HOST
=
"http://localhost:8990"
;
public
static
string
HOST
=
"http://localhost:8990"
;
public
ScoresRes
Scores
;
public
Server
()
public
Server
()
{
{
}
}
...
@@ -35,8 +37,8 @@ namespace Assets.Scripts.API
...
@@ -35,8 +37,8 @@ namespace Assets.Scripts.API
Debug
.
LogError
(
"Error:"
+
www
.
error
);
Debug
.
LogError
(
"Error:"
+
www
.
error
);
}
else
{
}
else
{
Debug
.
Log
(
"Got response: "
+
www
.
downloadHandler
.
text
);
Debug
.
Log
(
"Got response: "
+
www
.
downloadHandler
.
text
);
Scores
Res
res
=
ScoresRes
.
CreateFromJson
(
www
.
downloadHandler
.
text
);
Scores
=
ScoresRes
.
CreateFromJson
(
www
.
downloadHandler
.
text
);
Debug
.
Log
(
"Got scores: "
+
res
);
Debug
.
Log
(
"Got scores: "
+
Sco
res
);
}
}
}
}
...
...
Assets/Scripts/Menu.cs
View file @
fab7144d
...
@@ -18,4 +18,9 @@ public class Menu : MonoBehaviour {
...
@@ -18,4 +18,9 @@ public class Menu : MonoBehaviour {
{
{
SceneManager
.
LoadScene
(
"Main"
);
SceneManager
.
LoadScene
(
"Main"
);
}
}
public
void
OnButtonScoresClicked
()
{
SceneManager
.
LoadScene
(
"Scores"
);
}
}
}
Assets/Scripts/Player.cs
View file @
fab7144d
...
@@ -38,9 +38,7 @@ namespace Assets.Scripts
...
@@ -38,9 +38,7 @@ namespace Assets.Scripts
}
}
if
(
Progression
==
25
)
if
(
Progression
==
25
)
{
{
if
(
PlayerPrefs
.
GetInt
(
"highscore"
)
<
Score
)
Score
+=
200
;
PlayerPrefs
.
SetInt
(
"highscore"
,
Score
);
SceneManager
.
LoadScene
(
"Win"
);
}
}
}
}
...
...
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