Exemple #1
0
 public override string GetTypeIdentifier(Units.Type type)
 {
     if (type.Parent == null || type.Parent is File)
     {
         return(type.Name);
     }
     else
     {
         return(GetIdentifier(type.Parent) + "." + (type.Name == "" ? UnknownIdentifier : type.Name));
     }
 }
Exemple #2
0
    void Awake()
    {
        // Defaults
        unitType        = Units.Type.Standard;
        outputRulerUnit = Units.RulerUnit.Feet;

        // Ensure one instance of this
        if (engine == null)
        {
            DontDestroyOnLoad(this);
            engine = this;
        }
        else if (engine != this)
        {
            Destroy(this);
        }

        // Limit Frame Rate
        Application.targetFrameRate = 10;


        // Get References
        GameObject found = GameObject.FindWithTag("ScreenManager");

        if (found != null)
        {
            screenManager = found.GetComponent <ScreenManager>();
        }
        found = GameObject.FindWithTag("EventManager");
        if (found != null)
        {
            eventManager = found.GetComponent <EventManager>();
        }
        found = GameObject.FindWithTag("ConduitManager");
        if (found != null)
        {
            conduitManager   = found.GetComponent <ConduitManager>();
            conduitGenerator = found.GetComponent <ConduitGenerator>();
        }
        GameObject[] foundarr = GameObject.FindGameObjectsWithTag("MainCamera");
        if (foundarr.Length != 0)
        {
            for (int i = 0; i < foundarr.Length; ++i)
            {
                if (mainCameraController = foundarr[i].GetComponent <CameraController>())
                {
                    break;
                }
            }
        }
        mainCameraController.movementEnabled = false;

        root_ui        = GameObject.Find("_UI").transform;
        root_geometry  = GameObject.Find("_Geometry").transform;
        root_conduit   = GameObject.Find("_Conduit").transform;
        root_particles = GameObject.Find("_Particles").transform;
        root_flag      = GameObject.Find("_Flag").transform;

        cameraUI   = GameObject.FindWithTag("UICamera").GetComponent <Camera>();
        cameraMain = GameObject.FindWithTag("MainCamera").GetComponent <Camera>();

#if UNITY_EDITOR
        // Check Nulls
        if (screenManager == null)
        {
            Debug.LogError("Engine: Initialize() No Screen Manager found in scene with the tag 'SceneManager'.");
            return;
        }
        if (eventManager == null)
        {
            Debug.LogError("Engine: Initialize() No Event Manager found in scene on object with the tag 'EventManager'.");
            return;
        }
        if (conduitManager == null)
        {
            Debug.LogError("Engine: Initialize() No Conduit Manager found in scene on object with the tag 'ConduitManager'.");
            return;
        }
        if (conduitGenerator == null)
        {
            Debug.LogError("Engine: Initialize() No Conduit Generator found in scene on object with the tag 'ConduitManager'.");
            return;
        }
        if (mainCameraController == null)
        {
            Debug.LogError("Engine: Initialize() No Main Camera Controller found in scene on object with the tag 'MainCamera'.");
            return;
        }
#endif

        //DebugToScreen.Log( "Engine: Initialize() Awake Complete!" );
    }
Exemple #3
0
 public override string GetTypeDisplay(Units.Type type)
 {
     throw new NotImplementedException();
 }