Commit 4386f2f1 authored by Manuel Buß's avatar Manuel Buß
Browse files

Solution A3

parent 3df2c0f6
......@@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 6411032540897539154}
- component: {fileID: 4845184490890940709}
- component: {fileID: 3662898596762574005}
- component: {fileID: 5938868358341713651}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
......@@ -93,3 +94,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
player: 0
--- !u!114 &5938868358341713651
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1919731297574007180}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b7bcdab3e376fea46b9c494857c6f864, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 5
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float speed;
private IInputProvider input;
private void Start()
{
input = GetComponent<IInputProvider>();
}
private void FixedUpdate()
{
transform.position += Vector3.right * input.Direction() * speed * Time.fixedDeltaTime;
}
}
fileFormatVersion: 2
guid: b7bcdab3e376fea46b9c494857c6f864
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
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