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
860021db
Commit
860021db
authored
Mar 30, 2019
by
Isa
Browse files
Merge branch 'master' of
https://gitlab.fsi.hochschule-trier.de/GameDevWeek/ws-18_19/unity/suck-it
parents
0bd42707
b08cddbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Scripts/SaveAndLoad/SavePoint.cs
View file @
860021db
...
...
@@ -14,6 +14,8 @@ public class SavePoint : MonoBehaviour
private
void
Start
()
{
isUsed
=
false
;
button
.
interactable
=
false
;
anim
=
GetComponent
<
Animator
>();
//options = gameObject.transform.Find("Options");
}
...
...
Assets/_Game/Scripts/SaveAndLoad/SavePointList.cs
View file @
860021db
...
...
@@ -13,7 +13,6 @@ namespace SavePointListScript
{
spl
=
this
;
savePointList
=
GameObject
.
FindGameObjectsWithTag
(
"Respawn"
);
Debug
.
Log
(
savePointList
.
Length
);
}
public
bool
[]
GetIsActivList
()
...
...
@@ -21,7 +20,6 @@ namespace SavePointListScript
if
(
savePointList
.
Length
>
0
)
{
bool
[]
savePointIsActiv
=
new
bool
[
savePointList
.
Length
];
Debug
.
Log
(
savePointIsActiv
.
Length
);
int
i
=
0
;
foreach
(
GameObject
var
in
savePointList
)
{
...
...
@@ -36,10 +34,9 @@ namespace SavePointListScript
public
void
SetIsActivList
(
bool
[]
savePointIsActiv
)
{
int
i
=
0
;
Debug
.
Log
(
savePointIsActiv
.
Length
);
foreach
(
GameObject
var
in
savePointList
)
{
Debug
.
Log
(
var
);
Debug
.
Log
(
savePointIsActiv
[
i
]
);
SavePoint
temp
=
savePointList
[
i
].
GetComponent
<
SavePoint
>();
temp
.
SetIsUsed
(
savePointIsActiv
[
i
]);
i
++;
...
...
Assets/_Game/Scripts/SaveAndLoad/SaveSystem.cs
View file @
860021db
...
...
@@ -30,6 +30,7 @@ public class SaveSystem
FileStream
stream
=
new
FileStream
(
path
,
FileMode
.
Open
);
SavePointData
data
=
formatter
.
Deserialize
(
stream
)
as
SavePointData
;
Debug
.
Log
(
data
.
savePointIsActiv
);
if
(
data
.
savePointIsActiv
!=
null
)
{
SavePointList
.
spl
.
SetIsActivList
(
data
.
savePointIsActiv
);
...
...
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