31 lines
659 B
C#
31 lines
659 B
C#
using UnityEngine;
|
|
|
|
public class PlayerController : OrbitalPositionBehaviour
|
|
{
|
|
public GameObject m_EnemyPrefab;
|
|
|
|
protected override void OnStart()
|
|
{
|
|
GlobalOrbitalPositionManager.SetPlayer(m_OrbitalPosition);
|
|
m_OrbitalPosition.m_RadiusDistance = 0.4f;
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Space))
|
|
{
|
|
m_OrbitalPosition.m_AttachedRing += 1;
|
|
}
|
|
|
|
if (Input.GetKey(KeyCode.E))
|
|
{
|
|
Instantiate(m_EnemyPrefab);
|
|
}
|
|
}
|
|
|
|
public override void OnCollision(OrbitalPositionBehaviour other)
|
|
{
|
|
Debug.Log("HIT OBSTACLE IG");
|
|
}
|
|
}
|