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(); }
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); }
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; }
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>(); }
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>(); }
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>(); }
// Use this for initialization void Awake() { selectedAtoms = 0; text = selectedText.GetComponent <Text>(); atomTouchGUI = Camera.main.GetComponent <AtomTouchGUI>(); }
void Awake() { atomTouchGUI = Camera.main.GetComponent <AtomTouchGUI>(); createEnvironment = Camera.main.GetComponent <CreateEnvironment> (); }
void Awake() { RegisterAtom (this); atomTouchGUI = Camera.main.gameObject.GetComponent<AtomTouchGUI>(); state = (int)State.Default; }
public void Init(AtomTouchGUI controller) { this.controller = controller; }
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> (); }
void Awake() { atomTouchGUI = Camera.main.GetComponent<AtomTouchGUI>(); createEnvironment = Camera.main.GetComponent<CreateEnvironment> (); }
void Awake() { RegisterAtom(this); atomTouchGUI = Camera.main.gameObject.GetComponent <AtomTouchGUI>(); state = (int)State.Default; }
// 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(); }
public static void EnableSelectAtomGroup(bool enable) { AtomTouchGUI atomTouchGUI = Camera.main.GetComponent <AtomTouchGUI>(); atomTouchGUI.selectAtomPanel.SetActive(enable); }
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; }