Ejemplo n.º 1
0
    void OnEnable()
    {
        register.SetActive(true);
        rankingBoard.SetActive(false);

        resultTime.text = TimeUI.ToTimeString(timeUI.lapTimeValue);
        resultExp.text  = ScoreUI.ToScoreString(scoreUI.expValue);
    }
Ejemplo n.º 2
0
 void Awake()
 {
     genTargets = GetComponentInChildren<GenerateTargets>();
     targets = genTargets.Generate();
     timer = GameObject.FindObjectOfType<TimeUI>();
     player = GameObject.FindObjectOfType<Player>();
     youLose = GameObject.FindWithTag("YouLose").GetComponent<Image>();
     Debug.Assert(youLose.name == "YouLose");
 }
Ejemplo n.º 3
0
 public void Refresh()
 {
     order.text = orderValue.ToString();
     if (iconImage != null)
     {
         icon.sprite = iconImage;
     }
     lapTime.text = TimeUI.ToTimeString(lapTimeValue);
     exp.text     = ScoreUI.ToScoreString(expValue);
     name.text    = nameValue;
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Awake()
 {
     levelCompleteScreen.SetActive(false);
     inputManager   = FindObjectOfType <InputManager>();
     gameManager    = FindObjectOfType <GameManager>();
     gameSaver      = GameSaver.instance;
     bitsUI         = FindObjectOfType <BitsUI>();
     timeUI         = FindObjectOfType <TimeUI>();
     bitsUI.reqBits = reqBits;
     timeUI.reqTime = reqTime;
 }
Ejemplo n.º 5
0
    public void StartSimulation()
    {
        history = SpeciesManager.Instance.GetComponent <SpeciesMotor>();
        Transform canvas = GameObject.Find("Canvas").transform;

        timeUI = canvas.GetChild(2).GetComponent <TimeUI>();
        timeUI.SetupSimulation();
        cameraMovementUI = canvas.GetChild(3).GetComponent <CameraMovementUI>();
        zoomMovementUI   = canvas.GetChild(3).GetComponent <ZoomMovementUI>();
        cameraTransform  = Camera.main.transform;
        cameraTransform.localPosition = new Vector3(0, SimulationScript.Instance.earthSize / 1.5f, 0);
        RefreshSlider();
        timeUI.Pause();
    }
Ejemplo n.º 6
0
    private void InitializeUIElements()
    {
        GameObject uielement = GameObject.FindGameObjectWithTag("UIMiniCamera");

        if (uielement == null)
        {
            Debug.LogError("MiniCamera UI not found");
            return;
        }

        cameraUIText = uielement.GetComponentInChildren <Text>();

        if (cameraUIText == null)
        {
            Debug.LogError("MiniCamera Text not found");
        }

        uiUpdater = GameObject.FindGameObjectWithTag("TimerUI").GetComponent <TimeUI>();

        if (uiUpdater == null)
        {
            Debug.LogError("UI Game Timer not found");
        }

        uiTaskUpdater = GameObject.FindGameObjectWithTag("Clapboard").GetComponent <TaskUIScript>();

        if (uiTaskUpdater == null)
        {
            Debug.LogError("UI Task Updater not found");
        }

        map = GameObject.FindGameObjectWithTag("MapTile").GetComponent <Map>();

        if (uiTaskUpdater == null)
        {
            Debug.LogError("Map not found");
        }

        lvlCounterText = GameObject.FindGameObjectWithTag("LvlCounterUI").GetComponent <Text>();

        if (lvlCounterText == null)
        {
            Debug.LogError("LvlCounterUINotFound");
        }
    }
Ejemplo n.º 7
0
    public void Awake()
    {
        //loveInterests = new List<LoveInterest>(GameObject.FindObjectsOfType<LoveInterest>());
        mansion = GameObject.FindObjectOfType <Mansion>();

        sfxManager           = GameObject.FindObjectOfType <SFXManager>();
        bgmManager           = GameObject.FindObjectOfType <BGMManager>();
        dialogControls       = GameObject.FindObjectOfType <DialogController>();
        mapControls          = GameObject.FindObjectOfType <MapController>();
        diaryControls        = GameObject.FindObjectOfType <DiaryController> ();
        timeUI               = GameObject.FindObjectOfType <TimeUI>();
        backgroundControls   = GameObject.FindObjectOfType <BackgroundController>();
        foregroundControls   = GameObject.FindObjectOfType <ForegroundController>();
        loveInterestControls = GameObject.FindObjectOfType <LoveInterestSelectController>();
        screenFader          = GameObject.FindObjectOfType <ScreenFader>();
        dayControls          = GameObject.FindObjectOfType <DayManager>();

        instance = this;
    }
Ejemplo n.º 8
0
 void Start()
 {
     _timer = FindObjectOfType <TimeUI>();
 }