Added basic player movement
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GlobalOrbitalUpdater : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c730cd22059933a4f89df9280cb3216d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -1100
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -19,8 +19,8 @@ public class GlobalOrbitalPositionManager : MonoBehaviour
|
||||
|
||||
List<OrbitalPosition> m_ObjectInstances = new();
|
||||
|
||||
[SerializeField, Range(0f, 1f)] float m_RadiusSpeed = 0.5f;
|
||||
[SerializeField, Range(0f, 1f)] float m_DistanceSpeed = 0.5f;
|
||||
[SerializeField, Range(0f, Mathf.PI * 2)] float m_RadiusSpeed = 2f;
|
||||
[SerializeField, Range(0f, 2f)] float m_DistanceSpeed = 2f;
|
||||
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void OnApplicationStart()
|
||||
|
||||
@@ -8,4 +8,12 @@ public class PlayerController : OrbitalPositionBehaviour
|
||||
{
|
||||
m_OrbitalPosition.DistanceFromCentre = 10;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
m_OrbitalPosition.DistanceFromCentre += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user