Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Overbrewed
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GameDevWeek
S
Sommersemester 2019
Unity
Overbrewed
Commits
9c803572
Commit
9c803572
authored
Sep 22, 2019
by
Sebastian
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
11eb3c59
7230b287
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
21 deletions
+60
-21
Assets/_Game/Data/Health/HealthInitialVariable.asset
Assets/_Game/Data/Health/HealthInitialVariable.asset
+1
-1
Assets/_Game/Prefabs/Characters/PlayerBase.prefab
Assets/_Game/Prefabs/Characters/PlayerBase.prefab
+1
-1
Assets/_Game/Prefabs/UI/PauseMenu.prefab
Assets/_Game/Prefabs/UI/PauseMenu.prefab
+6
-6
Assets/_Game/Scenes/MainMenu.unity
Assets/_Game/Scenes/MainMenu.unity
+3
-3
Assets/_Game/Scripts/Customer/CustomerBehaviour.cs
Assets/_Game/Scripts/Customer/CustomerBehaviour.cs
+39
-5
Assets/_Game/Scripts/Player/PlayerBazookaAiming.cs
Assets/_Game/Scripts/Player/PlayerBazookaAiming.cs
+1
-1
Assets/_Game/Scripts/Player/PlayerInputSystemManager.cs
Assets/_Game/Scripts/Player/PlayerInputSystemManager.cs
+3
-3
Assets/_Game/Scripts/Player/PlayerRotate.cs
Assets/_Game/Scripts/Player/PlayerRotate.cs
+1
-1
Assets/_Game/Scripts/UI/CustomerBar.cs
Assets/_Game/Scripts/UI/CustomerBar.cs
+5
-0
No files found.
Assets/_Game/Data/Health/HealthInitialVariable.asset
View file @
9c803572
...
...
@@ -13,7 +13,7 @@ MonoBehaviour:
m_Name
:
HealthInitialVariable
m_EditorClassIdentifier
:
DeveloperDescription
:
value
:
10
value
:
2
oldValue
:
10
Changed
:
{
fileID
:
0
}
ChangedWithHistory
:
{
fileID
:
0
}
Assets/_Game/Prefabs/Characters/PlayerBase.prefab
View file @
9c803572
...
...
@@ -56,7 +56,7 @@ CapsuleCollider:
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_Enabled
:
1
m_Radius
:
1
m_Radius
:
1
.2
m_Height
:
3.7
m_Direction
:
1
m_Center
:
{
x
:
-0
,
y
:
1.9
,
z
:
-0
}
...
...
Assets/_Game/Prefabs/UI/PauseMenu.prefab
View file @
9c803572
...
...
@@ -1973,17 +1973,17 @@ RectTransform:
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
5638002898429637794
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0.
16791996
,
w
:
0.9858006
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0.
20987998
,
w
:
0.9777272
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
2943840638048515376
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
-
19.334002
}
m_AnchorMin
:
{
x
:
0
.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
107
,
y
:
134
}
m_SizeDelta
:
{
x
:
701.7
,
y
:
350.9
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
-
24.231
}
m_AnchorMin
:
{
x
:
0
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
1
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
92
,
y
:
140
}
m_SizeDelta
:
{
x
:
-253.79999
,
y
:
313.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&9194969150082210956
CanvasRenderer
:
...
...
Assets/_Game/Scenes/MainMenu.unity
View file @
9c803572
...
...
@@ -1273,7 +1273,7 @@ RectTransform:
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
:
-253
,
y
:
1
35
}
m_AnchoredPosition
:
{
x
:
-253
,
y
:
1
57
}
m_SizeDelta
:
{
x
:
647.9
,
y
:
415.3
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&904270023
...
...
@@ -1808,8 +1808,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
-
294.4
,
y
:
-5
3
}
m_SizeDelta
:
{
x
:
-7
25.9
,
y
:
-214.9
}
m_AnchoredPosition
:
{
x
:
-
300.3
,
y
:
-75.14
3
}
m_SizeDelta
:
{
x
:
-7
14.2
,
y
:
-170.61
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!1
&1255162963
GameObject
:
...
...
Assets/_Game/Scripts/Customer/CustomerBehaviour.cs
View file @
9c803572
...
...
@@ -15,6 +15,9 @@ public class CustomerBehaviour : MonoBehaviour
[
SerializeField
]
private
float
orderPopUpTime
=
5
;
[
SerializeField
]
private
float
waitingTime
=
90
;
private
bool
_percOne
=
false
;
private
bool
_percTwo
=
false
;
private
bool
_percThree
=
false
;
private
GameObject
_cameraObject
;
private
NavMeshAgent
_agent
;
...
...
@@ -100,6 +103,25 @@ public class CustomerBehaviour : MonoBehaviour
_state
=
CustomerState
.
Leaving
;
}
if
(
_customerBar
.
getPercentage
()
>=
0.25
&&
!
_percOne
)
{
StartCoroutine
(
OrderAgain
(
orderPopUpTime
));
_percOne
=
true
;
}
if
(
_customerBar
.
getPercentage
()
>=
0.50
&&
!
_percTwo
)
{
StartCoroutine
(
OrderAgain
(
orderPopUpTime
));
_percTwo
=
true
;
}
if
(
_customerBar
.
getPercentage
()
>=
0.75
&&
!
_percThree
)
{
StartCoroutine
(
OrderAgain
(
orderPopUpTime
));
_percThree
=
true
;
}
_playerActor
.
gameObject
.
transform
.
LookAt
(
_playerActor
.
gameObject
.
transform
.
position
+
_agent
.
velocity
);
Vector3
trans
=
_customerBar
.
transform
.
position
;
...
...
@@ -107,16 +129,27 @@ public class CustomerBehaviour : MonoBehaviour
_orderPopUp
.
transform
.
LookAt
(
_cameraObject
.
transform
);
}
private
IEnumerator
OrderA
ndWait
(
float
orderDuration
)
private
IEnumerator
OrderA
gain
(
float
orderDuration
)
{
//_customerBar.gameObject.SetActive(false);
_orderPopUp
.
SetActive
(
true
);
yield
return
new
WaitForSeconds
(
orderDuration
);
_orderPopUp
.
SetActive
(
false
);
//_customerBar.gameObject.SetActive(true);
_state
=
CustomerState
.
Random
;
}
private
IEnumerator
OrderAndWait
(
float
orderDuration
)
{
_orderPopUp
.
SetActive
(
true
);
yield
return
new
WaitForSeconds
(
orderDuration
);
_orderPopUp
.
SetActive
(
false
);
_customerBar
.
gameObject
.
SetActive
(
true
);
_customerBar
.
initializeBar
(
90f
);
_customerBar
.
initializeBar
(
90f
);
_state
=
CustomerState
.
Random
;
...
...
@@ -175,17 +208,18 @@ public class CustomerBehaviour : MonoBehaviour
_agent
.
SetDestination
(
transform
.
parent
.
position
);
_customerBar
.
gameObject
.
SetActive
(
false
);
_state
=
CustomerState
.
Leaving
;
Destroy
(
other
.
gameObject
);
}
else
{
// Wrong Beer
_playerActor
.
AudioSource
.
PlayOneShot
(
_customerSounds
.
GetHappyClip
(),
0.2f
);
_customerBar
.
addPercentageOfSlider
(-
0.3f
);
Destroy
(
other
.
gameObject
);
}
}
}
else
if
(
other
.
collider
.
gameObject
.
CompareTag
(
"Projectile"
))
Destroy
(
other
.
gameObject
);
}
else
if
(
other
.
collider
.
gameObject
.
CompareTag
(
"Projectile"
))
{
_playerActor
.
AudioSource
.
PlayOneShot
(
_customerSounds
.
GetSadClip
(),
0.2f
);
_customerBar
.
addPercentageOfSlider
(
0.3f
);
...
...
Assets/_Game/Scripts/Player/PlayerBazookaAiming.cs
View file @
9c803572
...
...
@@ -45,7 +45,7 @@ public class PlayerBazookaAiming : MonoBehaviour
_playerActor
.
LineRenderer
.
SetPosition
(
0
,
bazookaPos
);
List
<
Vector3
>
bezierCurve
;
if
(
Physics
.
Raycast
(
aimRay
,
out
RaycastHit
raycastHit
,
0
,
LayerMask
.
GetMask
(
"Environment"
))
&&
raycastHit
.
distance
<=
dashSize
)
if
(
Physics
.
Raycast
(
aimRay
,
out
RaycastHit
raycastHit
,
0
,
LayerMask
.
GetMask
(
"Environment"
,
"Customer"
))
&&
raycastHit
.
distance
<=
dashSize
)
{
Vector3
pos2
=
bazookaPos
+
(
raycastHit
.
point
-
bazookaPos
)
/
2
;
...
...
Assets/_Game/Scripts/Player/PlayerInputSystemManager.cs
View file @
9c803572
...
...
@@ -77,7 +77,7 @@ public class PlayerInputSystemManager : MonoBehaviour, IInputManager
return
false
;
if
(
GetGamePadCount
()
>=
playerNumber
)
result
=
_gamepads
[
playerNumber
-
1
].
xButton
.
isPressed
;
result
=
_gamepads
[
playerNumber
-
1
].
leftTrigger
.
isPressed
;
if
(
GetGamePadCount
()
==
0
)
result
=
Keyboard
.
current
.
spaceKey
.
isPressed
;
...
...
@@ -94,10 +94,10 @@ public class PlayerInputSystemManager : MonoBehaviour, IInputManager
return
false
;
if
(
GetGamePadCount
()
>=
playerNumber
)
result
=
_gamepads
[
playerNumber
-
1
].
rightTrigger
.
wasPressedThisFrame
||
_gamepads
[
playerNumber
-
1
].
leftTrigger
.
wasPressedThisFrame
;
result
=
_gamepads
[
playerNumber
-
1
].
rightTrigger
.
isPressed
;
if
(
GetGamePadCount
()
==
0
)
result
=
Keyboard
.
current
.
fKey
.
wasPressedThisFrame
;
result
=
Keyboard
.
current
.
fKey
.
isPressed
;
return
result
;
}
...
...
Assets/_Game/Scripts/Player/PlayerRotate.cs
View file @
9c803572
...
...
@@ -27,7 +27,7 @@ public class PlayerRotate : MonoBehaviour
if
(
_playerActor
.
PlayerMovement
!=
null
)
{
if
(
_playerActor
.
PlayerMovement
.
MoveDirection
.
sqrMagnitude
>
0
.1
)
if
(
_playerActor
.
PlayerMovement
.
MoveDirection
.
sqrMagnitude
>
0
)
direction
=
_playerActor
.
PlayerMovement
.
MoveDirection
.
normalized
;
if
(!
_playerActor
.
PlayerMovement
.
MoveDirection
.
Equals
(
Vector3
.
zero
))
...
...
Assets/_Game/Scripts/UI/CustomerBar.cs
View file @
9c803572
...
...
@@ -70,5 +70,10 @@ public class CustomerBar : MonoBehaviour
{
return
(
customerSlider
.
value
>=
100
);
}
public
float
getPercentage
()
{
return
_currentTime
/
durationTime
;
}
}
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