Example #1
0
    void Awake()
    {
        CreateEnvironment.myEnvironment = this;
        atomTouchGUI = Camera.main.GetComponent <AtomTouchGUI> ();
        atomTouchGUI.changingTemp = false;
        atomTouchGUI.changingVol  = false;
        //when first started, pause timer
        StaticVariables.pauseTime = true;

        centerPos        = Vector3.zero;
        initialCenterPos = centerPos;

        //figure out the dimensions of the box based on the volume
        width  = Mathf.Pow(volume, (1.0f / 3.0f));
        height = Mathf.Pow(volume, (1.0f / 3.0f));
        depth  = Mathf.Pow(volume, (1.0f / 3.0f));

        vx = new Vector3(width, 0.0f, 0.0f);
        vy = new Vector3(0.0f, height, 0.0f);
        vz = new Vector3(0.0f, 0.0f, depth);

        CreatePlanes();



        CreateAllLines();
    }
Example #2
0
 public void Init(AtomTouchGUI controler)
 {
     levelsButton.onClick.AddListener (controler.LevelsOpen);
     creditsButton.onClick.AddListener (controler.CreditsOpen);
     freePlayButton.onClick.AddListener (controler.FreePlayOpen);
     ReplayVideoButton.onClick.AddListener (controler.IntroVideoOpen);
 }
Example #3
0
    void Awake()
    {
        mouseExitsSettingsPanel = true;
        gamePaused = false;
        mySettings = this;

        atomTouchGUI       = Camera.main.GetComponent <AtomTouchGUI>();
        nmToggle           = nmOn.GetComponent <Toggle>();
        trailsToggle       = trailsOn.GetComponent <Toggle>();
        atomRendererToggle = atomRendererOn.GetComponent <Toggle>();
        simTypeChanged     = false;
    }
Example #4
0
    void Awake()
    {
        atomTouchGUI = AtomTouchGUI.myAtomTouchGUI;
        graphPanel = atomTouchGUI.graphPanel;
        graphRect = graphPanel.GetComponent<RectTransform>().rect;
        canvasScale = atomTouchGUI.hud.GetComponent<Canvas>().scaleFactor;
        graphHeight = graphRect.height * canvasScale;

        float graphOriginX = graphPanel.GetComponent<RectTransform>().anchorMin.x * Screen.width;
        float graphOriginY = graphPanel.GetComponent<RectTransform>().anchorMin.y * Screen.height;

        graphOrigin = new Vector2(graphOriginX, graphOriginY);
        yMaxTextComp = yMaxText.GetComponent<Text>();
    }
Example #5
0
    void Awake()
    {
        atomTouchGUI = AtomTouchGUI.myAtomTouchGUI;
        graphPanel   = atomTouchGUI.graphPanel;
        graphRect    = graphPanel.GetComponent <RectTransform>().rect;
        canvasScale  = atomTouchGUI.hud.GetComponent <Canvas>().scaleFactor;
        graphHeight  = graphRect.height * canvasScale;

        float graphOriginX = graphPanel.GetComponent <RectTransform>().anchorMin.x *Screen.width;
        float graphOriginY = graphPanel.GetComponent <RectTransform>().anchorMin.y *Screen.height;

        graphOrigin  = new Vector2(graphOriginX, graphOriginY);
        yMaxTextComp = yMaxText.GetComponent <Text>();
    }
Example #6
0
    void Awake()
    {
        myAtomTouchGUI = this;

        tempSliderComponent = tempSlider.GetComponent <Slider> ();
        volSliderComponent  = volSlider.GetComponent <Slider>();
        //set slider range
        tempSliderComponent.minValue = StaticVariables.minTemp;
        tempSliderComponent.maxValue = StaticVariables.maxTemp;

        volSliderComponent.minValue = StaticVariables.minVol * 0.1f;         //to nm
        volSliderComponent.maxValue = StaticVariables.maxVol * 0.1f;         //to nm

        Atom.EnableSelectAtomGroup(false);
        settingsCanvas.SetActive(false);
        eventSystem = GameObject.Find("EventSystem").gameObject.GetComponent <EventSystem>();
    }
Example #7
0
 // Use this for initialization
 void Awake()
 {
     selectedAtoms = 0;
     text          = selectedText.GetComponent <Text>();
     atomTouchGUI  = Camera.main.GetComponent <AtomTouchGUI>();
 }
Example #8
0
 void Awake()
 {
     atomTouchGUI      = Camera.main.GetComponent <AtomTouchGUI>();
     createEnvironment = Camera.main.GetComponent <CreateEnvironment> ();
 }
Example #9
0
 void Awake()
 {
     RegisterAtom (this);
     atomTouchGUI = Camera.main.gameObject.GetComponent<AtomTouchGUI>();
     state = (int)State.Default;
 }
Example #10
0
 public void Init(AtomTouchGUI controller)
 {
     this.controller = controller;
 }
Example #11
0
    void Awake()
    {
        myAtomTouchGUI = this;
        currentAtomPreset = "box";
        tempSliderComponent = tempSlider.GetComponent<Slider> ();
        volSliderComponent = volSlider.GetComponent<Slider> ();
        //set slider range
        tempSliderComponent.minValue = StaticVariables.minTemp;
        tempSliderComponent.maxValue = StaticVariables.maxTemp;

        volSliderComponent.minValue = StaticVariables.minVol * 0.1f; //to nm
        volSliderComponent.maxValue = StaticVariables.maxVol * 0.1f; //to nm

        Atom.EnableSelectAtomGroup (false);
        eventSystem = GameObject.Find ("EventSystem").gameObject.GetComponent<EventSystem> ();
    }
Example #12
0
 void Awake()
 {
     atomTouchGUI = Camera.main.GetComponent<AtomTouchGUI>();
     createEnvironment = Camera.main.GetComponent<CreateEnvironment> ();
 }
Example #13
0
 void Awake()
 {
     RegisterAtom(this);
     atomTouchGUI = Camera.main.gameObject.GetComponent <AtomTouchGUI>();
     state        = (int)State.Default;
 }
Example #14
0
 // Use this for initialization
 void Awake()
 {
     selectedAtoms = 0;
     text = selectedText.GetComponent<Text>();
     atomTouchGUI = Camera.main.GetComponent<AtomTouchGUI>();
 }
    void Awake()
    {
        CreateEnvironment.myEnvironment = this;
        atomTouchGUI = Camera.main.GetComponent<AtomTouchGUI> ();
        atomTouchGUI.changingTemp = false;
        atomTouchGUI.changingVol = false;
        //when first started, pause timer
        StaticVariables.pauseTime = true;

        centerPos = Vector3.zero;
        initialCenterPos = centerPos;

        //figure out the dimensions of the box based on the volume
        width = Mathf.Pow (volume, (1.0f / 3.0f));
        height = Mathf.Pow (volume, (1.0f / 3.0f));
        depth = Mathf.Pow (volume, (1.0f / 3.0f));

        vx  = new Vector3(width,0.0f,0.0f);
        vy = new Vector3(0.0f,height, 0.0f);
        vz = new Vector3(0.0f,0.0f, depth);

        CreatePlanes();

        CreateAllLines();
    }
Example #16
0
    public static void EnableSelectAtomGroup(bool enable)
    {
        AtomTouchGUI atomTouchGUI = Camera.main.GetComponent <AtomTouchGUI>();

        atomTouchGUI.selectAtomPanel.SetActive(enable);
    }
Example #17
0
    void Awake()
    {
        mySettings = this;
        mouseExitsSettingsPanel = true;
        gamePaused = false;

        atomTouchGUI = Camera.main.GetComponent<AtomTouchGUI>();
        nmToggle = nmOn.GetComponent<Toggle>();
        trailsToggle = trailsOn.GetComponent<Toggle>();
        atomRendererToggle = atomRendererOn.GetComponent<Toggle>();
        simTypeChanged = false;
    }