Sector renderer is now also rendering asteroid belts. All gravity calculations have been moved out of monobehaviors.
18 lines
391 B
C#
18 lines
391 B
C#
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;
|
|
}
|
|
}
|