Asteroid Belts
Sector renderer is now also rendering asteroid belts. All gravity calculations have been moved out of monobehaviors.
This commit is contained in:
parent
d12d7c5c45
commit
a981a46170
76 changed files with 25027 additions and 2016 deletions
18
Assets/Scripts/Sector Display/GravityObject.cs
Normal file
18
Assets/Scripts/Sector Display/GravityObject.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GravityObject : MonoBehaviour
|
||||
{
|
||||
[HideInInspector]
|
||||
public Material GravityMaterial;
|
||||
|
||||
[HideInInspector]
|
||||
public string Shader;
|
||||
|
||||
void Start () {
|
||||
Gravity.Instance.GravityObjects.Add(this);
|
||||
GravityMaterial = GetComponent<MeshRenderer>().material;
|
||||
Shader = GravityMaterial.shader.name;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue