Example #1
0
    private void OnSceneGUI()
    {
        HardpointModule hp = (HardpointModule)target;
        Transform       tf = hp.transform;
        HardpointConfig hc = hp.config;

        //Draw traversal arcs
        Handles.color = new Color(1.0f, 0.5f, 0.5f, 0.1f);
        if (hc.limitBearing)
        {
            Handles.DrawSolidArc(tf.position, tf.up, tf.forward, hc.maxBearing, ArcSize);
            Handles.DrawSolidArc(tf.position, tf.up, tf.forward, -hc.minBearing, ArcSize);
        }
        else
        {
            Handles.DrawSolidArc(tf.position, tf.up, tf.forward, 360.0f, ArcSize);
        }

        //Draw elevation arc
        Handles.color = new Color(0.5f, 0.5f, 1.0f, 0.1f);
        Handles.DrawSolidArc(tf.position, tf.right, tf.forward, -hc.maxAzimuth, ArcSize);

        //Draw depression arc
        Handles.color = new Color(0.5f, 1.0f, 0.5f, 0.1f);
        Handles.DrawSolidArc(tf.position, tf.right, tf.forward, hc.minAzimuth, ArcSize);
    }
 public override void Equip(HardpointModule slot)
 {
     Cooldown = 0;
 }
 public override void Equip(HardpointModule slot)
 {
 }
Example #4
0
    public override void OnInspectorGUI()
    {
        HardpointModule hp = (HardpointModule)target;

        DrawDefaultInspector();
    }
 public abstract void Equip(HardpointModule slot);
 public ModuleInfo(HardpointModule fromModule)
 {
     itemType = fromModule.ModuleType ? fromModule.ModuleType.name : null;
     cooldown = fromModule.Cooldown;
 }