Skip to content
GitLab
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
6ca6e586
Commit
6ca6e586
authored
Mar 27, 2019
by
Michael But
Browse files
Liste für die SavePoints mit ScriptableObjects
parent
ede080cb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Data/Level Data/Level1SavePoints.asset
0 → 100644
View file @
6ca6e586
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!114
&11400000
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
0
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
d1544a4ab12f8b84f8f4f5c7a826cb02
,
type
:
3
}
m_Name
:
Level1SavePoints
m_EditorClassIdentifier
:
TestWithArray
:
-
{
fileID
:
0
}
-
{
fileID
:
0
}
-
{
fileID
:
0
}
-
{
fileID
:
0
}
-
{
fileID
:
0
}
-
{
fileID
:
0
}
-
{
fileID
:
0
}
-
{
fileID
:
0
}
Assets/_Game/
Scripts/Interaction
.meta
→
Assets/_Game/
Data/Level Data/Level1SavePoints.asset
.meta
View file @
6ca6e586
fileFormatVersion: 2
guid: 5782222d4c9b9424ea96676650e643a8
folderAsset: yes
DefaultImporter:
guid: 42bfd5430f16efc4884a04384bfadc16
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Data/Player Data/Movement Data/Movement States.asset
View file @
6ca6e586
...
...
@@ -10,5 +10,45 @@ MonoBehaviour:
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
0
}
m_Name
:
Movement State
m_Name
:
Movement State
s
m_EditorClassIdentifier
:
Assembly-CSharp:_Game.Scripts.Scriptable_Object:MovementStates
airMoveState
:
jumpForce
:
0
smoothing
:
0
airControl
:
0
moveSpeed
:
0
maxJumpCount
:
0
mass
:
0
gravity
:
0
earthMoveState
:
jumpForce
:
0
smoothing
:
0
airControl
:
0
moveSpeed
:
0
maxJumpCount
:
0
mass
:
0
gravity
:
0
fireMoveState
:
jumpForce
:
0
smoothing
:
0
airControl
:
0
moveSpeed
:
0
maxJumpCount
:
0
mass
:
0
gravity
:
0
waterMoveState
:
jumpForce
:
0
smoothing
:
0
airControl
:
0
moveSpeed
:
0
maxJumpCount
:
0
mass
:
0
gravity
:
0
defaultMoveState
:
jumpForce
:
0
smoothing
:
0
airControl
:
0
moveSpeed
:
0
maxJumpCount
:
0
mass
:
0
gravity
:
0
Assets/_Game/Scripts/SaveAndLoad/TestPlayer.cs
deleted
100644 → 0
View file @
ede080cb
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
TestPlayer
:
MonoBehaviour
{
public
float
speed
;
public
Transform
pos
;
private
Rigidbody2D
rb
;
void
Start
()
{
rb
=
GetComponent
<
Rigidbody2D
>();
}
void
FixedUpdate
()
{
if
(
Input
.
GetKey
(
"left"
))
{
rb
.
AddForce
(
new
Vector2
(-
speed
,
0
),
ForceMode2D
.
Impulse
);
;
}
if
(
Input
.
GetKey
(
"right"
))
{
rb
.
AddForce
(
new
Vector2
(
speed
,
0
),
ForceMode2D
.
Impulse
);
;
}
if
(
Input
.
GetKey
(
"up"
))
{
SavePointData
point
=
SaveSystem
.
LoadSavePoint
();
Vector2
position
=
new
Vector2
();
position
.
x
=
point
.
position
[
0
];
position
.
y
=
point
.
position
[
1
];
transform
.
position
=
position
;
}
}
}
Assets/_Game/Scripts/Scriptable Object/SavePointList.cs
0 → 100644
View file @
6ca6e586
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
[
CreateAssetMenu
]
public
class
SavePointList
:
ScriptableObject
{
public
Transform
[]
TestWithArray
=
new
Transform
[
5
];
}
Assets/_Game/Scripts/S
aveAndLoad/TestPlayer
.cs.meta
→
Assets/_Game/Scripts/S
criptable Object/SavePointList
.cs.meta
View file @
6ca6e586
fileFormatVersion: 2
guid:
aefd10ff4a996f74d85673ee1893c4b9
guid:
d1544a4ab12f8b84f8f4f5c7a826cb02
MonoImporter:
externalObjects: {}
serializedVersion: 2
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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