Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gstuitje
RingMaster
Commits
f06c181e
Commit
f06c181e
authored
Feb 11, 2019
by
Mitchie Maluschnig
Browse files
character dialogue now depends on their level
parent
34a6e4d3
Changes
5
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterInteractions.cs
View file @
f06c181e
...
...
@@ -54,7 +54,7 @@ public class CharacterInteractions : MonoBehaviour {
private
IEnumerator
checkLevelUp
()
{
yield
return
new
WaitForSeconds
(
0.1f
);
if
(
characterScript
.
getName
()
!=
"Ahava"
&&
!
GameManager
.
HasTalkedToAhava
)
{
if
(
characterScript
.
getName
()
!=
"Ahava"
)
{
LevelUpImage
.
gameObject
.
SetActive
(
false
);
}
else
{
LevelUpImage
.
gameObject
.
SetActive
(
GameManager
.
hasLeveledUp
(
characterScript
.
getName
()));
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/JohnSmithSpeech.cs
View file @
f06c181e
...
...
@@ -22,19 +22,19 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
loadConversation
();
if
(
GameManager
.
ConversationStage
==
1
)
{
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
1
)
{
currentResponses
=
new
string
[]
{
"Hi there"
};
return
"Hello, im John Smith"
;
}
else
if
(
GameManager
.
ConversationStage
==
2
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
2
)
{
currentResponses
=
new
string
[]
{
"stage 2 greeting response"
};
return
"stage 2 (hello) grr"
;
}
else
if
(
GameManager
.
ConversationStage
==
3
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
3
)
{
currentResponses
=
new
string
[]
{
"stage 3 greeting response"
};
return
"stage 3 (hello) grr"
;
}
else
if
(
GameManager
.
ConversationStage
==
4
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
4
)
{
currentResponses
=
new
string
[]
{
"stage 4 greeting response"
};
return
"stage 4 (hello) grr"
;
...
...
@@ -77,16 +77,16 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
conversation
.
Clear
();
responseQueue
.
Clear
();
if
(
GameManager
.
ConversationStage
==
1
)
{
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
1
)
{
conversationStage1
();
}
else
if
(
GameManager
.
ConversationStage
==
2
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
2
)
{
conversationStage2
();
}
else
if
(
GameManager
.
ConversationStage
==
3
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
3
)
{
conversationStage3
();
}
else
if
(
GameManager
.
ConversationStage
==
4
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
4
)
{
conversationStage4
();
}
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/SilasSpeech.cs
View file @
f06c181e
...
...
@@ -21,19 +21,19 @@ public class SilasSpeech : MonoBehaviour, Character {
public
string
GreetingMessage
(){
loadConversation
();
if
(
GameManager
.
ConversationStage
==
1
)
{
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
1
)
{
currentResponses
=
new
string
[]
{
"Hi there"
,
"Umm hello?"
,
"was geht ab?"
};
return
"..."
;
}
else
if
(
GameManager
.
ConversationStage
==
2
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
2
)
{
currentResponses
=
new
string
[]
{
"stage 2 greeting response"
};
return
"stage 2 greeetiong"
;
}
else
if
(
GameManager
.
ConversationStage
==
3
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
3
)
{
currentResponses
=
new
string
[]
{
"stage 3 greeting response"
};
return
"stage 3 greeting"
;
}
else
if
(
GameManager
.
ConversationStage
==
4
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
4
)
{
currentResponses
=
new
string
[]
{
"stage 4 greeting response"
};
return
"stage 4 greeting"
;
...
...
@@ -57,17 +57,18 @@ public class SilasSpeech : MonoBehaviour, Character {
public
string
nothingMoreToSay
()
{
if
(
GameManager
.
HasTalkedToAhava
)
{
currentResponses
=
new
string
[]
{
"wow, tell me more"
,
"my ears are bleeding"
};
switch
(
Random
.
Range
(
0
,
10
))
{
case
0
:
return
"1"
;
case
1
:
return
"2"
;
case
2
:
return
"3"
;
case
3
:
return
"4"
;
case
4
:
return
"5"
;
case
5
:
return
"6"
;
case
6
:
return
"7"
;
case
7
:
return
"8"
;
case
8
:
return
"9"
;
case
9
:
return
"10"
;
switch
(
Random
.
Range
(
0
,
11
))
{
case
0
:
return
"According to circus superstition, it's unlucky to wear green in the ring."
;
case
1
:
return
"A 'josser' is an outsider who joins the circus."
;
case
2
:
return
"The word clown is believed to come from the Icelandic word klunni, meaning a clumsy person."
;
case
3
:
return
"A street mime was so committed that he actually got stuck in his imaginary box and died of starvation"
;
case
4
:
return
"Banging your head against the wall burns 150 calories"
;
case
5
:
return
"29th May is oficially 'Put a Pillow on your Fridge Day'."
;
case
6
:
return
"in 2017 more people were kiled from injuries caused by taking a selfie than by shark attacks"
;
case
7
:
return
"Did you know Honey Bees can recognise human faces"
;
case
8
:
return
"A small child could swim through the veins of a Blue Whale"
;
case
9
:
return
"pirates wore earings because they believed it improved their eyesight"
;
case
10
:
return
"20th March is Snowman Burning day to celebrate the end of winter"
;
default
:
return
"..."
;
}
...
...
@@ -94,16 +95,16 @@ public class SilasSpeech : MonoBehaviour, Character {
{
loadTutorialConversation
();
}
else
if
(
GameManager
.
ConversationStage
==
1
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
1
)
{
conversationStage1
();
}
else
if
(
GameManager
.
ConversationStage
==
2
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
2
)
{
conversationStage2
();
}
else
if
(
GameManager
.
ConversationStage
==
3
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
3
)
{
conversationStage3
();
}
else
if
(
GameManager
.
ConversationStage
==
4
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
4
)
{
conversationStage4
();
}
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/SimonSpeech.cs
View file @
f06c181e
...
...
@@ -21,19 +21,19 @@ public class SimonSpeech : MonoBehaviour, Character {
public
string
GreetingMessage
(){
loadConversation
();
if
(
GameManager
.
ConversationStage
==
1
)
{
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
1
)
{
currentResponses
=
new
string
[]
{
"Wow a bear"
};
return
"(happy) grr"
;
}
else
if
(
GameManager
.
ConversationStage
==
2
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
2
)
{
currentResponses
=
new
string
[]
{
"stage 2 greeting response"
};
return
"stage 2 (hello) grr"
;
}
else
if
(
GameManager
.
ConversationStage
==
3
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
3
)
{
currentResponses
=
new
string
[]
{
"stage 3 greeting response"
};
return
"stage 3 (hello) grr"
;
}
else
if
(
GameManager
.
ConversationStage
==
4
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
4
)
{
currentResponses
=
new
string
[]
{
"stage 4 greeting response"
};
return
"stage 4 (hello) grr"
;
...
...
@@ -79,16 +79,16 @@ public class SimonSpeech : MonoBehaviour, Character {
if
(
GameManager
.
SimonTutorial
)
{
loadTutorialConversation
();
}
else
if
(
GameManager
.
ConversationStage
==
1
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
1
)
{
conversationStage1
();
}
else
if
(
GameManager
.
ConversationStage
==
2
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
2
)
{
conversationStage2
();
}
else
if
(
GameManager
.
ConversationStage
==
3
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
3
)
{
conversationStage3
();
}
else
if
(
GameManager
.
ConversationStage
==
4
)
{
}
else
if
(
(
int
)
GameManager
.
getLevel
(
getName
())
==
4
)
{
conversationStage4
();
}
...
...
RingMaster/RingMaster/Assets/Scripts/GameManager.cs
View file @
f06c181e
...
...
@@ -5,9 +5,9 @@ using UnityEngine;
public
class
GameManager
:
MonoBehaviour
{
public
static
float
AhavaLevel
;
public
static
float
SilasLevel
=
1.
3
f
;
public
static
float
SimonLevel
=
1
.3
f
;
public
static
float
JohnLevel
=
1
.3
f
;
public
static
float
SilasLevel
=
1.
1
f
;
public
static
float
SimonLevel
=
1f
;
public
static
float
JohnLevel
=
1f
;
public
static
bool
AhavaLevelUp
;
private
static
bool
SilasLevelUp
=
true
;
...
...
@@ -87,6 +87,22 @@ public class GameManager : MonoBehaviour {
}
}
public
static
float
getLevel
(
string
name
)
{
if
(
name
==
"Simon"
)
{
return
SimonLevel
;
}
if
(
name
==
"Silas"
)
{
return
SilasLevel
;
}
if
(
name
==
"John"
)
{
return
JohnLevel
;
}
if
(
name
==
"Ahava"
)
{
return
AhavaLevel
;
}
return
0
;
}
// Use this for initialization
void
Start
()
{
if
(
ConversationStage
>=
2
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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