Exemplo n.º 1
0
    private void Awake()
    {
        inst = this;

        isActive        = true;
        backgroundImage = background.GetComponent <Image>();
    }
    // Start is called before the first frame update
    void Start()
    {
        particles = GameObject.FindGameObjectWithTag("ParticleController").GetComponent <ParticleController>();
        endLevel  = false;
        //ObjMarkerSingle = ObjMarker.GetComponent<ObjectiveMarker>();

        _phoneUI = GameObject.Find("PopUpPhone").GetComponent <PhoneUI>();
        dataPost = GameObject.FindGameObjectWithTag("Data").GetComponent <DrivePost>();

        Objectives[0].objectiveObject.SetActive(true);
        for (int i = 1; i < Objectives.Length; i++)
        {
            if (Objectives[i].objectiveObject != null)
            {
                //Debug.Log("Turning off " + Objectives[i].objectiveObject.name);
                if (Objectives[0].objectiveObject != Objectives[i].objectiveObject)
                {
                    Objectives[i].objectiveObject.SetActive(false);
                }
            }
        }



        StartCoroutine(GameStartDelay(3));
        foreach (Message m in Objectives[0].messages)
        {
            _phoneUI.SetNotifyMessage(m);
        }
        objectiveCount++;
    }
Exemplo n.º 3
0
        public static PhoneUI PhoneFromDTO(PhoneDTO phonedto)
        {
            PhoneUI result = new PhoneUI();

            result.Mark  = phonedto.Mark;
            result.Model = phonedto.Model;
            result.Price = phonedto.Price;
            result.ID    = phonedto.ID;
            return(result);
        }
Exemplo n.º 4
0
        public static PhoneDTO PhoneFromUI(PhoneUI phoneui)
        {
            PhoneDTO result = new PhoneDTO();

            result.Mark  = phoneui.Mark;
            result.Model = phoneui.Model;
            result.Price = phoneui.Price;
            result.ID    = phoneui.ID;
            return(result);
        }
    // Start is called before the first frame update
    void Start()
    {
        if (!nullValues)
        {
            string[] names = Input.GetJoystickNames();
            foreach (string name in names)
            {
                if (name != "")
                {
                    controllerPresent = true;
                    Cursor.visible    = false;
                }
            }


            player         = GameObject.Find("Player").GetComponent <PlayerController>();
            specials       = player.gameObject.GetComponent <SpecialsManager>();
            aerialListener = aerialCamera.GetComponent <AudioListener>();
            mainListener   = mainCamera.GetComponent <AudioListener>();
            ObjMng         = gameObject.GetComponent <ObjectivesManager>();
            ArrInd         = gameObject.GetComponent <ArrowIndicator>();
            PhoneUI        = GameObject.Find("PopUpPhone").GetComponent <PhoneUI>();
            dataPost       = GameObject.FindGameObjectWithTag("Data").GetComponent <DrivePost>();
            int   width  = Screen.width;
            int   height = Screen.height;
            float ratio  = width / 1920;
            width  = (int)(width * ratio);
            height = (int)(height * ratio);
            ArrInd.SetHideArrow();
#if UNITY_EDITOR
            Debug.Log("In Editor");
#else
            Screen.SetResolution(width, height, true);
#endif
        }
    }