Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gstuitje
RingMaster
Commits
c080bc8a
Commit
c080bc8a
authored
Feb 13, 2019
by
mmaluschnig
Browse files
fixed a couple bugs
parent
6ede53a8
Changes
5
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterInteractions.cs
View file @
c080bc8a
...
@@ -84,7 +84,10 @@ public class CharacterInteractions : MonoBehaviour {
...
@@ -84,7 +84,10 @@ public class CharacterInteractions : MonoBehaviour {
interacting
=
true
;
interacting
=
true
;
setText
(
speechBox
,
characterScript
.
GreetingMessage
(),
Mathf
.
Infinity
,
characterScript
.
getResponses
());
setText
(
speechBox
,
characterScript
.
GreetingMessage
(),
Mathf
.
Infinity
,
characterScript
.
getResponses
());
interactButton
.
gameObject
.
SetActive
(
false
);
interactButton
.
gameObject
.
SetActive
(
false
);
GameManager
.
setLeveledUp
(
characterScript
.
getName
(),
false
);
if
(
GameManager
.
HasTalkedToAhava
)
{
GameManager
.
setLeveledUp
(
characterScript
.
getName
(),
false
);
}
LevelUpImage
.
gameObject
.
SetActive
(
false
);
LevelUpImage
.
gameObject
.
SetActive
(
false
);
}
}
//generate speech every so often while the player is nearby
//generate speech every so often while the player is nearby
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/DaytimeManager.cs
View file @
c080bc8a
...
@@ -14,21 +14,26 @@ public class DaytimeManager : MonoBehaviour {
...
@@ -14,21 +14,26 @@ public class DaytimeManager : MonoBehaviour {
public
static
bool
enteringName
;
public
static
bool
enteringName
;
void
Start
()
{
void
Start
()
{
if
(
Ahava
!=
null
&&
Ahava
.
activeSelf
)
float
newLevel
=
1
{
+
GameManager
.
JohnLevel
-
1
float
newLevel
=
1
+
GameManager
.
SilasLevel
-
1
+
GameManager
.
JohnLevel
-
1
+
GameManager
.
SimonLevel
-
1
;
+
GameManager
.
SilasLevel
-
1
float
diffinLevels
=
newLevel
-
GameManager
.
AhavaLevel
;
+
GameManager
.
SimonLevel
-
1
;
print
(
"diff"
+
diffinLevels
);
float
diffinLevels
=
newLevel
-
GameManager
.
AhavaLevel
;
print
(
"start"
+
GameManager
.
AhavaLevel
%
1
);
print
(
"diff"
+
diffinLevels
);
if
((
GameManager
.
AhavaLevel
%
1
)
+
diffinLevels
>
1
)
{
print
(
"start"
+
GameManager
.
AhavaLevel
%
1
);
GameManager
.
AhavaLevelUp
=
true
;
if
((
GameManager
.
AhavaLevel
%
1
)
+
diffinLevels
>
1
)
{
GameManager
.
AhavaLevelUp
=
true
;
}
GameManager
.
AhavaLevel
=
newLevel
;
GameManager
.
ConversationStage
=
(
int
)
GameManager
.
AhavaLevel
;
print
(
"ahava Lvl"
+
GameManager
.
AhavaLevel
);
}
}
GameManager
.
AhavaLevel
=
newLevel
;
GameManager
.
ConversationStage
=
(
int
)
GameManager
.
AhavaLevel
;
print
(
"ahava Lvl"
+
GameManager
.
AhavaLevel
);
}
}
void
Update
()
{
void
Update
()
{
...
...
RingMaster/RingMaster/Assets/Scripts/GameManager.cs
View file @
c080bc8a
...
@@ -34,6 +34,8 @@ public class GameManager : MonoBehaviour {
...
@@ -34,6 +34,8 @@ public class GameManager : MonoBehaviour {
public
static
bool
HasTalkedToAhava
;
public
static
bool
HasTalkedToAhava
;
public
static
bool
HasCompleatedIntro
;
public
static
void
addToLevel
(
string
name
,
float
points
)
{
public
static
void
addToLevel
(
string
name
,
float
points
)
{
if
(
name
==
"Simon"
)
{
if
(
name
==
"Simon"
)
{
if
((
SimonLevel
%
1
)
+
points
>
1
)
{
if
((
SimonLevel
%
1
)
+
points
>
1
)
{
...
@@ -114,5 +116,31 @@ public class GameManager : MonoBehaviour {
...
@@ -114,5 +116,31 @@ public class GameManager : MonoBehaviour {
void
Update
()
{
void
Update
()
{
}
}
public
static
void
reset
(){
SilasLevel
=
1.1f
;
SimonLevel
=
1f
;
JohnLevel
=
1f
;
SilasLevelUp
=
true
;
SimonLevelUp
=
true
;
JohnLevelUp
=
true
;
playerName
=
"Dennis"
;
FirstTimePie
=
true
;
FirstTimeMime
=
true
;
FirstTimeTrapeze
=
true
;
SimonTutorial
=
false
;
JohnTutorial
=
false
;
SilasTutorial
=
false
;
SilasNoteInPlace
=
false
;
PlayerCanDance
=
true
;
HasTalkedToAhava
=
false
;
HasCompleatedIntro
=
false
;
}
}
}
RingMaster/RingMaster/Assets/Scripts/MenuScripts/MainMenu.cs
View file @
c080bc8a
...
@@ -6,13 +6,20 @@ using UnityEngine.SceneManagement;
...
@@ -6,13 +6,20 @@ using UnityEngine.SceneManagement;
public
class
MainMenu
:
MonoBehaviour
{
public
class
MainMenu
:
MonoBehaviour
{
public
void
StartGame
()
{
public
void
StartGame
()
{
SceneManager
.
LoadScene
(
"Daytime"
);
if
(
GameManager
.
HasCompleatedIntro
)
{
SceneManager
.
LoadScene
(
"Daytime"
);
}
else
{
SceneManager
.
LoadScene
(
"IntroScene"
);
}
}
}
public
void
ExitGame
()
{
public
void
ExitGame
()
{
Application
.
Quit
();
}
}
public
void
StartOver
()
{
public
void
StartOver
()
{
//reset stuff
//reset stuff
GameManager
.
reset
();
SceneManager
.
LoadScene
(
"Daytime"
);
SceneManager
.
LoadScene
(
"Daytime"
);
}
}
...
...
RingMaster/RingMaster/Assets/Scripts/MenuScripts/PauseMenu.cs
View file @
c080bc8a
...
@@ -63,7 +63,7 @@ public class PauseMenu : MonoBehaviour {
...
@@ -63,7 +63,7 @@ public class PauseMenu : MonoBehaviour {
setPauseMenu
(
false
);
setPauseMenu
(
false
);
}
}
public
void
ExitGame
()
{
public
void
ExitGame
()
{
Application
.
Quit
();
}
}
public
void
ExitToMainMenu
()
{
public
void
ExitToMainMenu
()
{
Time
.
timeScale
=
1
;
Time
.
timeScale
=
1
;
...
...
Write
Preview
Supports
Markdown
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