void Start()
 {
     im = GlobalVars.interact_mode;
     rm = GlobalVars.room_manager;
     dia = GlobalVars.description_ui;
     dm = GlobalVars.dialogue_manager;
 }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        techUI = GetComponentInParent <TechnologyUI>();
        itemButton.onClick.AddListener(ShowDescription);
        DescriptionUI desUI = Description.GetComponent <DescriptionUI>();

        createButton   = desUI.CreateButton;
        ErrorMessage   = desUI.ErrorMessage;
        DesCloseButton = desUI.CloseButton;
        createButton.onClick.AddListener(CreateObject);
        DesCloseButton.onClick.AddListener(CloseAll);
        m_Inventory = FindObjectOfType <Inventory>();
    }
    public void Start()
    {
        im = GlobalVars.interact_mode;

        dm = GlobalVars.dialogue_manager;

        cui = GlobalVars.cursor_ui;

        dui = GlobalVars.description_ui;
        aui = GlobalVars.action_text_ui;

        if(GlobalVars.database == null || dm == null || im == null || GlobalVars.database == null)
            this.enabled = false; // dont run script if we are missing dependacies
        else
            myData = GlobalVars.database.GetCharacter(CharacterId);

        MouseOver = false;
    }
    void Start()
    {
        room_visible = true;
        dia = GlobalVars.description_ui;
        im = GlobalVars.interact_mode;
        PlayerTF = GlobalVars.player_transform;

        room_cams = new Camera[rooms.Length];
        room_lis = new AudioListener[rooms.Length];
        room_spawn_points = new Vector3[rooms.Length];
        for(int i = 0; i < rooms.Length; i++)
        {
            Camera c = (Camera)(rooms[i].GetComponentInChildren<Camera>());
            c.enabled = false; // turn off camera
            room_cams[i] = c;

            AudioListener al = (AudioListener)(rooms[i].GetComponentInChildren<AudioListener>());
            al.enabled = false;
            room_lis[i] = al;

            room_spawn_points[i] = rooms[i].transform.Find("SPAWN_POINT").transform.position;
        }

        FullScreenRect = new Rect(0, 0, Screen.width, Screen.height);
        Col = Color.black;

        OverlayTexture = (Texture2D)Resources.Load ("textures/white");

        EnterRoom (room_cur);
    }
    void Start()
    {
        db = GlobalVars.database;
        if(db == null) // no database, means script cant do shit
            this.enabled = false;
        else
        {
            myObjectData = db.GetObject(object_id);

            if(myObjectData == null)
                this.enabled = false;
        }

        im = GlobalVars.interact_mode;

        aui = GlobalVars.action_text_ui;
        di = GlobalVars.description_ui;

        inv = GlobalVars.inventory;

        cui = GlobalVars.cursor_ui;

        MouseOver = false;
    }