Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Wintersemester 2018-2019
Unity
Suck It
Commits
f41476f1
Commit
f41476f1
authored
Mar 29, 2019
by
Michael But
Browse files
Updatet SavePoint
parent
d53ec134
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Graphics/Sprite/SavePoint.meta
0 → 100644
View file @
f41476f1
fileFormatVersion: 2
guid: bc43ac6a6d9af5e44b800027e40c1e84
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scenes/MainLevel-Michi_Isa.unity
0 → 100644
View file @
f41476f1
This diff is collapsed.
Click to expand it.
Assets/_Game/Scenes/MainLevel-Michi_Isa.unity.meta
0 → 100644
View file @
f41476f1
fileFormatVersion: 2
guid: a557c41513022e744831753cb4ad512f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scripts/SaveAndLoad/SavePoint.cs
View file @
f41476f1
...
...
@@ -3,32 +3,36 @@ using System.Collections.Generic;
using
UnityEngine
;
using
LevelauswahlScript
;
using
PlayerSpawnPointScript
;
using
UnityEngine.UI
;
public
class
SavePoint
:
MonoBehaviour
{
private
bool
isUsed
;
private
Transform
options
;
public
Button
button
;
private
void
Start
()
{
button
.
interactable
=
false
;
isUsed
=
false
;
options
=
gameObject
.
transform
.
Find
(
"Options"
);
}
public
void
OnTriggerEnter2D
(
Collider2D
other
)
{
options
.
gameObject
.
SetActive
(
true
);
//
options.gameObject.SetActive(true);
}
public
void
OnTriggerExit2D
(
Collider2D
other
)
{
options
.
gameObject
.
SetActive
(
false
);
//
options.gameObject.SetActive(false);
}
public
void
OnTriggerStay2D
(
Collider2D
collision
)
{
if
(
Input
.
GetButtonDown
(
"Interact"
))
{
button
.
interactable
=
true
;
isUsed
=
true
;
SaveSystem
.
SavePointUpdate
(
this
);
}
else
if
(
Input
.
GetButtonDown
(
"Teleport"
)
&&
Levelauswahl
.
la
.
auswahlIsActive
()
==
false
)
...
...
@@ -44,6 +48,7 @@ public class SavePoint : MonoBehaviour
public
void
SetIsUsed
(
bool
var
)
{
button
.
interactable
=
var
;
isUsed
=
var
;
}
...
...
Write
Preview
Supports
Markdown
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