Inheritance: MonoBehaviour
 // Start is called before the first frame update
 void Start()
 {
     system               = new starSystem();
     GUIObjectScript      = GameObject.Find("GUIObject").GetComponent <GUILayoutObject>();
     cameraMovementScript = GameObject.Find("Main Camera").GetComponent <cameraMovement>();
     UpdateSystem();
 }
Exemple #2
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     mainImg         = gameObject.GetComponent <RawImage>();
     firstCam        = firstPersonCamera.GetComponent <cameraMovement>();
     thirdCam        = thirdPersonCamera.GetComponent <cameraMovement>();
     mainImg.texture = firstPerson;
     stat            = mainStatus.first;
 }
Exemple #4
0
 void Start()
 {
     camTransform = GameObject.Find("/CameraParent");
     camPos       = camTransform.transform.localPosition;
     cam          = camTransform.GetComponentInChildren <Camera>();
     camMove      = camTransform.GetComponent <cameraMovement>();
     //camPos.transform.position = Vector3.zero;
     controller = GetComponent <CharacterController>();
 }
Exemple #5
0
    public GUICamera(GUIManager gm)
    {
        this.gm = gm;
        camera = GameObject.Find("MainCamera").GetComponent<cameraMovement>();
        camera.gui_camera = this;

        menuWidth = gm.menuWidth;
        rightOffset = gm.rightOffset;
        topOffset = gm.topOffset;
        buttonHeight = gm.smallButtonHeight;
    }
Exemple #6
0
 // Use this for initialization
 void Start()
 {
     holding     = false;
     isStoveOn   = false;
     isCooking   = false;
     startTime   = 0;
     endTime     = 0;
     cookedIndex = -1;
     camScript   = mainCamera.GetComponent <cameraMovement>();
     invY        = camScript.cameraPositions[4].y + 0.3f;
     panText.SetActive(false);
 }
Exemple #7
0
    // Start is called before the first frame update
    void Start()
    {
        cameraMovementScript    = GameObject.Find("Main Camera").GetComponent <cameraMovement>();
        starSystemObjectScript  = GameObject.Find("starSystemObject").GetComponent <starSystemObject>();
        initialConditionsScript = GameObject.Find("starSystemObject").GetComponent <initialConditions>();

        map.Add("Figure-8", 1);
        map.Add("Figure-8 with little bias", 2);
        map.Add("3 bodies special stable orbit", 3);
        map.Add("2 bodies stable", 4);
        map.Add("3 bodies with collisions", 5);

        oldSliderValue = (float)starSystemObjectScript.h;
        menuSliderObject.GetComponent <UnityEngine.UI.Slider>().value    = oldSliderValue;
        InputFieldObject.GetComponent <UnityEngine.UI.InputField>().text = menuSliderObject.GetComponent <UnityEngine.UI.Slider>().value.ToString();

        tipMessage.SetActive(false);
    }
Exemple #8
0
    // Use this for initialization
    void Start()
    {
        cam = mainCamera.GetComponent <cameraMovement>();
        recipeText.Add("Cooking School");
        recipeText.Add("Ingredients:\n 4 eggs \n 1/4 cup whole milk \n 1 tablespoon butter \n salt and pepper(to taste) ");

        recipeText.Add("Crack eggs into mixing bowl ");
        recipeText.Add("Add Milk, Salt, and Pepper to the egg mixture");
        recipeText.Add("Whisk egg mixture thoroughly\n\n Whisk: to mix a liquid quickly with a fork to make the eggs fluffy");
        recipeText.Add("Heat a non-stick pan over a low medium heat");
        recipeText.Add("Test the heat");
        recipeText.Add("Melt butter onto the pan");
        recipeText.Add("Pour eggs into the pan");
        recipeText.Add("Stir gently until all the liquid is gone");
        recipeText.Add("Turn off the heat");
        recipeText.Add("Transfer eggs onto a plate");
        flameOn = false;
    }
Exemple #9
0
    // Start is called before the first frame update
    void Start()
    {
        starSystemObjectScript = GameObject.Find("starSystemObject").GetComponent <starSystemObject>();
        cameraMovementScript   = GameObject.Find("Main Camera").GetComponent <cameraMovement>();

        newStarXStr    = "0.0";
        newStarYStr    = "0.0";
        newStarZStr    = "10.0";
        newStarVxStr   = "0.0";
        newStarVyStr   = "0.0";
        newStarVzStr   = "0.0";
        newStarMassStr = "1E9";

        displayStarInfo = false;

        float.TryParse(newStarXStr, out newStarX);
        float.TryParse(newStarYStr, out newStarY);
        float.TryParse(newStarZStr, out newStarZ);
        float.TryParse(newStarVxStr, out newStarVx);
        float.TryParse(newStarVyStr, out newStarVy);
        float.TryParse(newStarVzStr, out newStarVz);
        float.TryParse(newStarMassStr, out newStarMass);
    }
Exemple #10
0
 private void Start()
 {
     cm     = GameObject.FindObjectOfType <cameraMovement>();
     player = GameObject.FindObjectOfType <moveCharacter>().transform;
     dm     = GameObject.FindObjectOfType <dialog_manager>();
 }
Exemple #11
0
 void Start()
 {
     cam = Camera.main.GetComponent <cameraMovement>();
 }
 void Start()
 {
     _cameramovement = _cameraObj.GetComponent <cameraMovement>();
 }
Exemple #13
0
 void Start()
 {
     _cameraMovement  = GetComponent <cameraMovement>();
     _cameraBehaviour = GetComponent <CameraBehaviour>();
 }
 // Start is called before the first frame update
 void Start()
 {
     hb = GameObject.FindObjectOfType <Healthbar>();
     dm = GameObject.FindObjectOfType <dialog_manager>();
     cm = GameObject.FindObjectOfType <cameraMovement>();
 }