Commit 6ca6e586 authored by Michael But's avatar Michael But
Browse files

Liste für die SavePoints mit ScriptableObjects

parent ede080cb
%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}
fileFormatVersion: 2
guid: 5782222d4c9b9424ea96676650e643a8
folderAsset: yes
DefaultImporter:
guid: 42bfd5430f16efc4884a04384bfadc16
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
......@@ -10,5 +10,45 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 0}
m_Name: Movement State
m_Name: Movement States
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
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;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu]
public class SavePointList : ScriptableObject
{
public Transform[] TestWithArray = new Transform[5];
}
fileFormatVersion: 2
guid: aefd10ff4a996f74d85673ee1893c4b9
guid: d1544a4ab12f8b84f8f4f5c7a826cb02
MonoImporter:
externalObjects: {}
serializedVersion: 2
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment