This website works better with JavaScript.
Home
Help
Sign In
Jam
/
GGJ_2021
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
Added lastHeld property to YeetHandle, which tracks last GameObject that held it
develop
MrJDunn
3 years ago
parent
c0c9b65719
commit
399c6716e7
2 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
Assets/Scripts/Behaviours/YeetController.cs
+2
-0
Assets/Scripts/Behaviours/YeetHandle.cs
+ 1
- 0
Assets/Scripts/Behaviours/YeetController.cs
View File
@ -43,6 +43,7 @@ public class YeetController : InputBehaviour
_child
=
child
;
_child
.
transform
.
parent
=
parent
.
transform
;
_child
.
GetComponent
<
YeetHandle
>
(
)
.
held
=
true
;
_child
.
GetComponent
<
YeetHandle
>
(
)
.
lastHeld
=
parent
;
yeetState
=
YeetState
.
Held
;
+ 2
- 0
Assets/Scripts/Behaviours/YeetHandle.cs
View File
@ -8,6 +8,8 @@ public class YeetHandle : MonoBehaviour
public
bool
held
{
get
;
set
;
}
public
GameObject
lastHeld
{
get
;
set
;
}
// Start is called before the first frame update
void
Start
(
)
{
Write
Preview
Loading…
Cancel
Save