Inheritance: MonoBehaviour
 // Constructed by the main gui
 internal NearbyGUI(MainGui owner)
 {
     mOwner = owner;
     mEndpoints = new Dictionary<string, EndpointHolder>();
     mEndpointsViewVector = new Vector2();
     mMessageLog = new List<string>();
     mKnownEndpoints = new HashSet<string>();
 }
Exemple #2
0
    public void Initialize()
    {
        gameObject.SetActive(true);
        _mainGui = MainGui.Instance;
        TestObject.GetComponent <Renderer>().sharedMaterial = ThisMaterial;
        _blitMaterial = new Material(Shader.Find("Hidden/Blit_Alignment"))
        {
            hideFlags = HideFlags.HideAndDontSave
        };

        if (_mainGui.DiffuseMapOriginal != null)
        {
            _textureToAlign = _mainGui.DiffuseMapOriginal;
        }
        else if (_mainGui.HeightMap != null)
        {
            _textureToAlign = _mainGui.HeightMap;
        }
        else if (_mainGui.MetallicMap != null)
        {
            _textureToAlign = _mainGui.MetallicMap;
        }
        else if (_mainGui.SmoothnessMap != null)
        {
            _textureToAlign = _mainGui.SmoothnessMap;
        }
        else if (_mainGui.EdgeMap != null)
        {
            _textureToAlign = _mainGui.EdgeMap;
        }
        else if (_mainGui.AoMap != null)
        {
            _textureToAlign = _mainGui.AoMap;
        }


        _doStuff = true;
    }
    public void Initialize()
    {
        this.gameObject.SetActive(true);
        MGS = MainGui.instance;
        testObject.GetComponent <Renderer>().sharedMaterial = thisMaterial;
        blitMaterial           = new Material(Shader.Find("Hidden/Blit_Alignment"));
        blitMaterial.hideFlags = HideFlags.HideAndDontSave;

        if (MGS._DiffuseMapOriginal != null)
        {
            textureToAlign = MGS._DiffuseMapOriginal;
        }
        else if (MGS._HeightMap != null)
        {
            textureToAlign = MGS._HeightMap;
        }
        else if (MGS._MetallicMap != null)
        {
            textureToAlign = MGS._MetallicMap;
        }
        else if (MGS._SmoothnessMap != null)
        {
            textureToAlign = MGS._SmoothnessMap;
        }
        else if (MGS._EdgeMap != null)
        {
            textureToAlign = MGS._EdgeMap;
        }
        else if (MGS._AOMap != null)
        {
            textureToAlign = MGS._AOMap;
        }


        doStuff = true;
    }
    public void Initialize()
    {
        InitializeSettings();

        MainGuiScript = MainGui.instance;
        thisMaterial  = MainGuiScript.FullMaterial;

        thisMaterial.SetTexture("_DisplacementMap", MainGuiScript._TextureGrey);
        thisMaterial.SetTexture("_DiffuseMap", MainGuiScript._TextureGrey);
        thisMaterial.SetTexture("_NormalMap", MainGuiScript._TextureNormal);
        thisMaterial.SetTexture("_MetallicMap", MainGuiScript._TextureBlack);
        thisMaterial.SetTexture("_SmoothnessMap", MainGuiScript._TextureGrey);
        thisMaterial.SetTexture("_AOMap", MainGuiScript._TextureWhite);
        thisMaterial.SetTexture("_EdgeMap", MainGuiScript._TextureGrey);
        thisMaterial.SetFloat("_DispOffset", 1.0f);

        _HeightMap = MainGuiScript._HeightMap;

        if (MainGuiScript._DiffuseMap != null)
        {
            _DiffuseMap = MainGuiScript._DiffuseMap;
        }
        else
        {
            _DiffuseMap = MainGuiScript._DiffuseMapOriginal;
        }
        _NormalMap     = MainGuiScript._NormalMap;
        _EdgeMap       = MainGuiScript._EdgeMap;
        _MetallicMap   = MainGuiScript._MetallicMap;
        _SmoothnessMap = MainGuiScript._SmoothnessMap;
        _AOMap         = MainGuiScript._AOMap;

        if (_HeightMap != null)
        {
            thisMaterial.SetTexture("_DisplacementMap", _HeightMap);
        }
        if (_DiffuseMap != null)
        {
            thisMaterial.SetTexture("_DiffuseMap", _DiffuseMap);
        }
        if (_NormalMap != null)
        {
            thisMaterial.SetTexture("_NormalMap", _NormalMap);
        }
        if (_MetallicMap != null)
        {
            thisMaterial.SetTexture("_MetallicMap", _MetallicMap);
        }
        if (_SmoothnessMap != null)
        {
            thisMaterial.SetTexture("_SmoothnessMap", _SmoothnessMap);
        }
        if (_AOMap != null)
        {
            thisMaterial.SetTexture("_AOMap", _AOMap);
        }
        if (_EdgeMap != null)
        {
            thisMaterial.SetTexture("_EdgeMap", _EdgeMap);
        }

        testObject.GetComponent <Renderer>().material         = thisMaterial;
        testObjectCube.GetComponent <Renderer>().material     = thisMaterial;
        testObjectCylinder.GetComponent <Renderer>().material = thisMaterial;
        testObjectSphere.GetComponent <Renderer>().material   = thisMaterial;
    }
Exemple #5
0
 public AnnotationList(ArrayList annotations, MainGui gui)
 {
     this.annotations = annotations;
     this.gui         = gui;
 }
Exemple #6
0
 public AnnotationList(MainGui gui)
 {
     this.gui    = gui;
     annotations = new ArrayList();
 }
Exemple #7
0
 // Start is called before the first frame update
 void Start()
 {
     MainGui = FindObjectOfType <MainGui>();
 }
 public override void _Ready()
 {
     gui = GetNode("MainGui") as MainGui;
     gui.setGameStyle(0);
 }
Exemple #9
0
 private void Awake()
 {
     Instance = this;
 }
Exemple #10
0
 void OnDestroy()
 { instance = null; }
Exemple #11
0
 void Awake()
 { instance = this; }