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
8591d282
Commit
8591d282
authored
Jan 22, 2019
by
Mitchie Maluschnig
Browse files
moved speech scripts into their own folder
parent
03ddc057
Changes
6
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterInteractions.cs
View file @
8591d282
...
...
@@ -84,6 +84,7 @@ public class CharacterInteractions : MonoBehaviour {
//player exits characters range
void
exitInteractable
(){
interactButton
.
gameObject
.
SetActive
(
false
);
playerbutton1
.
gameObject
.
SetActive
(
false
);
if
(
interacting
)
{
setText
(
speechBox
,
characterScript
.
GoodbyeMessage
());
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech.meta
0 → 100644
View file @
8591d282
fileFormatVersion: 2
guid: 8a352c3787fbf35409ab4c52d6c984b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/AhavaScript.cs
→
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/
CharacterSpeech/
AhavaScript.cs
View file @
8591d282
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
AhavaScript
:
MonoBehaviour
,
Character
{
private
Queue
<
string
>
conversation
=
new
Queue
<
string
>();
void
Start
()
{
loadConversation
();
}
public
string
GreetingMessage
(){
return
"Hello Player, I am Ahava"
;
}
public
string
GoodbyeMessage
(){
return
"See you soon!"
;
}
public
string
ProximityMessage
(){
return
"My beard sense is tingling..."
;
}
public
string
butthurtGoodbye
(){
return
"Didnt want to admire my glorious beard?"
;
}
public
string
nothingMoreToSay
()
{
if
(
Random
.
Range
(
0
,
1f
)
<
0.8
)
{
return
"my beard grows tired of your chitter chatter"
;
}
else
{
return
"begone thot!"
;
}
}
public
string
converse
()
{
if
(
conversation
.
Count
>
0
)
{
return
conversation
.
Dequeue
();
}
else
{
return
nothingMoreToSay
();
}
}
private
void
loadConversation
()
{
conversation
.
Enqueue
(
"welcome to the circus"
);
conversation
.
Enqueue
(
"line 2"
);
conversation
.
Enqueue
(
"line 3"
);
conversation
.
Enqueue
(
"line 4"
);
conversation
.
Enqueue
(
"line 5"
);
conversation
.
Enqueue
(
"line 6"
);
}
}
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
AhavaScript
:
MonoBehaviour
,
Character
{
private
Queue
<
string
>
conversation
=
new
Queue
<
string
>();
void
Start
()
{
loadConversation
();
}
public
string
GreetingMessage
(){
return
"Hello Player, I am Ahava"
;
}
public
string
GoodbyeMessage
(){
return
"See you soon!"
;
}
public
string
ProximityMessage
(){
return
"My beard sense is tingling..."
;
}
public
string
butthurtGoodbye
(){
return
"Didnt want to admire my glorious beard?"
;
}
public
string
nothingMoreToSay
()
{
if
(
Random
.
Range
(
0
,
1f
)
<
0.8
)
{
return
"my beard grows tired of your chitter chatter"
;
}
else
{
return
"begone thot!"
;
}
}
public
string
converse
()
{
if
(
conversation
.
Count
>
0
)
{
return
conversation
.
Dequeue
();
}
else
{
return
nothingMoreToSay
();
}
}
private
void
loadConversation
()
{
conversation
.
Enqueue
(
"welcome to the circus"
);
conversation
.
Enqueue
(
"line 2"
);
conversation
.
Enqueue
(
"line 3"
);
conversation
.
Enqueue
(
"line 4"
);
conversation
.
Enqueue
(
"line 5"
);
conversation
.
Enqueue
(
"line 6"
);
}
}
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/AhavaScript.cs.meta
→
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/
CharacterSpeech/
AhavaScript.cs.meta
View file @
8591d282
File moved
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/Character.cs
→
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/
CharacterSpeech/
Character.cs
View file @
8591d282
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
interface
Character
{
string
GreetingMessage
();
string
GoodbyeMessage
();
string
butthurtGoodbye
();
string
nothingMoreToSay
();
string
ProximityMessage
();
string
converse
();
}
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
interface
Character
{
string
GreetingMessage
();
string
GoodbyeMessage
();
string
butthurtGoodbye
();
string
nothingMoreToSay
();
string
ProximityMessage
();
string
converse
();
}
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/Character.cs.meta
→
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/
CharacterSpeech/
Character.cs.meta
View file @
8591d282
File moved
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