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
ecf75254
Commit
ecf75254
authored
Feb 06, 2019
by
Mitchie Maluschnig
Browse files
aded a level bar to characters and created a game manager to track that kinda stuff
parent
25b0c501
Changes
12
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/Assets/Scenes/Daytime.unity
View file @
ecf75254
...
...
@@ -453,7 +453,7 @@ Transform:
m_LocalScale
:
{
x
:
4
,
y
:
3.7
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
10
m_RootOrder
:
9
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&134449645
GameObject
:
...
...
@@ -780,13 +780,14 @@ RectTransform:
-
{
fileID
:
1207186496
}
-
{
fileID
:
865213186
}
-
{
fileID
:
850495250
}
-
{
fileID
:
1350931561
}
m_Father
:
{
fileID
:
1949598428
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
76
,
y
:
13
4
}
m_SizeDelta
:
{
x
:
700
,
y
:
15
0
}
m_AnchoredPosition
:
{
x
:
76
,
y
:
1
1
3
}
m_SizeDelta
:
{
x
:
700
,
y
:
20
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&237130076
MonoBehaviour
:
...
...
@@ -1567,10 +1568,10 @@ RectTransform:
m_Father
:
{
fileID
:
237130075
}
m_RootOrder
:
2
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
55
,
y
:
-46
}
m_SizeDelta
:
{
x
:
-13
0
,
y
:
-108
}
m_AnchorMin
:
{
x
:
0
.5
,
y
:
0
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
55
,
y
:
20
}
m_SizeDelta
:
{
x
:
57
0
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&850495251
MonoBehaviour
:
...
...
@@ -1638,7 +1639,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
55
,
y
:
-
6
0
}
m_AnchoredPosition
:
{
x
:
55
,
y
:
-
10
0
}
m_SizeDelta
:
{
x
:
-130
,
y
:
100
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&865213187
...
...
@@ -2254,9 +2255,9 @@ RectTransform:
m_Father
:
{
fileID
:
237130075
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
60
,
y
:
-6
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
60
,
y
:
0
}
m_SizeDelta
:
{
x
:
100
,
y
:
100
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1207186497
...
...
@@ -2438,6 +2439,75 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
14
,
y
:
31.000002
}
m_SizeDelta
:
{
x
:
60
,
y
:
60
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!1
&1350931560
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1350931561
}
-
component
:
{
fileID
:
1350931563
}
-
component
:
{
fileID
:
1350931562
}
m_Layer
:
0
m_Name
:
CharacterLevel
m_TagString
:
LevelMeter
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&1350931561
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1350931560
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
237130075
}
m_RootOrder
:
3
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
1
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
54.000004
,
y
:
-22.999985
}
m_SizeDelta
:
{
x
:
570
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1350931562
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1350931560
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
-765806418
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite
:
{
fileID
:
21300000
,
guid
:
e986269e371ef3048b13fd122c2f8ff4
,
type
:
3
}
m_Type
:
3
m_PreserveAspect
:
0
m_FillCenter
:
1
m_FillMethod
:
0
m_FillAmount
:
1
m_FillClockwise
:
1
m_FillOrigin
:
0
---
!u!222
&1350931563
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1350931560
}
m_CullTransparentMesh
:
0
---
!u!1
&1397976876
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -7888,81 +7958,6 @@ Canvas:
m_SortingLayerID
:
-1020251125
m_SortingOrder
:
2
m_TargetDisplay
:
0
---
!u!1
&1977796532
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1977796534
}
-
component
:
{
fileID
:
1977796533
}
m_Layer
:
0
m_Name
:
cole tent
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
---
!u!212
&1977796533
SpriteRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1977796532
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
4294967295
m_Materials
:
-
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
-1966733235
m_SortingLayer
:
2
m_SortingOrder
:
1
m_Sprite
:
{
fileID
:
21300000
,
guid
:
9dcfcb216d85dd449816699afb0499e6
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
0
m_Size
:
{
x
:
10
,
y
:
5
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
---
!u!4
&1977796534
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1977796532
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
12.13
,
y
:
1.32
,
z
:
0
}
m_LocalScale
:
{
x
:
2.5099998
,
y
:
2.15
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
9
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&2138223314
GameObject
:
m_ObjectHideFlags
:
0
...
...
RingMaster/RingMaster/Assets/Scenes/Trapeze.unity
View file @
ecf75254
...
...
@@ -733,7 +733,7 @@ Prefab:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1602431506710890
,
guid
:
a6dd0ddad611645efbc5ef92c67041a7
,
type
:
2
}
propertyPath
:
m_IsActive
value
:
0
value
:
1
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
a6dd0ddad611645efbc5ef92c67041a7
,
type
:
2
}
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterInteractions.cs
View file @
ecf75254
...
...
@@ -9,6 +9,7 @@ public class CharacterInteractions : MonoBehaviour {
public
Button
interactButton
;
private
Text
speechBox
;
private
GameObject
faceCamDisplay
;
private
Image
LevelMeter
;
//character response stuff
private
Image
responsePanel
;
public
Button
[]
playerResponses
;
...
...
@@ -25,7 +26,6 @@ public class CharacterInteractions : MonoBehaviour {
private
float
speechBoxTimer
;
private
bool
wasInteracting
;
//prevents other characters from removing the dialogue box that this character is using
private
string
[]
testReplies
=
{
"Yes"
,
"no"
};
// Use this for initialization
void
Awake
()
{
...
...
@@ -37,11 +37,14 @@ public class CharacterInteractions : MonoBehaviour {
DialogueUI
=
GameObject
.
FindWithTag
(
"DialogueUI"
);
responsePanel
=
GameObject
.
FindWithTag
(
"ResponsePanel"
).
GetComponent
<
Image
>();
speechBox
=
GameObject
.
FindWithTag
(
"CharacterSpeech"
).
GetComponent
<
Text
>();
LevelMeter
=
GameObject
.
FindWithTag
(
"LevelMeter"
).
GetComponent
<
Image
>();
}
private
void
Start
()
{
interactButton
.
gameObject
.
SetActive
(
false
);
DialogueUI
.
gameObject
.
SetActive
(
false
);
//playerbutton1.gameObject.SetActive(false);
}
// Update is called once per frame
...
...
@@ -118,6 +121,7 @@ public class CharacterInteractions : MonoBehaviour {
DialogueUI
.
gameObject
.
SetActive
(
true
);
updateFaceCamDisplay
();
box
.
text
=
text
;
LevelMeter
.
fillAmount
=
characterScript
.
getLevel
();
print
(
text
);
//setting player reply options
for
(
int
i
=
0
;
i
<
playerResponses
.
Length
;
i
++)
{
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/AhavaSpeech.cs
View file @
ecf75254
...
...
@@ -10,6 +10,11 @@ public class AhavaSpeech : MonoBehaviour, Character {
private
string
[]
currentResponses
;
public
float
getLevel
()
{
return
GameManager
.
AhavaLevel
;
}
public
string
GreetingMessage
(){
loadConversation
();
currentResponses
=
new
string
[]
{
"Hi there"
,
"Who are you"
,
"what is this place"
};
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/Character.cs
View file @
ecf75254
...
...
@@ -3,6 +3,9 @@ using System.Collections.Generic;
using
UnityEngine
;
public
interface
Character
{
float
getLevel
();
string
GreetingMessage
();
string
GoodbyeMessage
();
string
butthurtGoodbye
();
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/JohnSmithSpeech.cs
View file @
ecf75254
...
...
@@ -10,6 +10,10 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
private
string
[]
currentResponses
;
public
float
getLevel
()
{
return
GameManager
.
JohnLevel
;
}
public
string
GreetingMessage
()
{
loadConversation
();
currentResponses
=
new
string
[]
{
"Hi there"
,
"Who are you"
};
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/SilasSpeech.cs
View file @
ecf75254
...
...
@@ -10,6 +10,10 @@ public class SilasSpeech : MonoBehaviour, Character {
private
string
[]
currentResponses
;
public
float
getLevel
()
{
return
GameManager
.
SilasLevel
;
}
public
string
GreetingMessage
(){
loadConversation
();
currentResponses
=
new
string
[]
{
"Hi there"
,
"Umm hello?"
,
"was geht ab?"
};
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/CharacterSpeech/SimonSpeech.cs
View file @
ecf75254
...
...
@@ -10,6 +10,10 @@ public class SimonSpeech : MonoBehaviour, Character {
private
string
[]
currentResponses
;
public
float
getLevel
()
{
return
GameManager
.
SimonLevel
;
}
public
string
GreetingMessage
(){
loadConversation
();
currentResponses
=
new
string
[]
{
"Hi there"
,
"Who are you"
,
"what is this place"
};
...
...
RingMaster/RingMaster/Assets/Scripts/DaytimeScripts/DaytimeManager.cs
View file @
ecf75254
...
...
@@ -16,31 +16,9 @@ public class DaytimeManager : MonoBehaviour {
}
void
Update
()
{
//pauseMenuManagemnent();
}
private
void
pauseMenuManagemnent
()
{
if
(!
pauseMenuActive
)
{
if
(
Input
.
GetKeyDown
(
KeyCode
.
Escape
))
{
setPauseMenu
(
true
);
}
}
else
{
if
(
Input
.
GetKeyDown
(
KeyCode
.
Escape
))
{
setPauseMenu
(
false
);
}
}
}
public
void
setPauseMenu
(
bool
active
)
{
pauseMenu
.
gameObject
.
SetActive
(
active
);
pauseMenuActive
=
active
;
if
(
active
)
{
Time
.
timeScale
=
0
;
}
else
{
Time
.
timeScale
=
1
;
}
}
public
static
void
beginPerformance
()
{
public
static
void
beginPerformance
()
{
SceneManager
.
LoadScene
(
"NightMenu"
);
}
}
RingMaster/RingMaster/Assets/Scripts/GameManager.cs
0 → 100644
View file @
ecf75254
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
GameManager
:
MonoBehaviour
{
public
static
float
AhavaLevel
=
0.5f
;
public
static
float
SilasLevel
;
public
static
float
SimonLevel
;
public
static
float
JohnLevel
;
// Use this for initialization
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
}
RingMaster/RingMaster/Assets/Scripts/GameManager.cs.meta
0 → 100644
View file @
ecf75254
fileFormatVersion: 2
guid: e3f7c9227d24d024ab830c15701239cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
RingMaster/RingMaster/ProjectSettings/TagManager.asset
View file @
ecf75254
...
...
@@ -18,6 +18,7 @@ TagManager:
-
Silas
-
Hands
-
LowRope
-
LevelMeter
layers
:
-
Default
-
TransparentFX
...
...
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