Esempio n. 1
0
    // ====================================================================== init
    // Use this for initialization
    void Start()
    {
        _shelter              = g.GetComponent <Shelter> ();
        _visitors             = g.GetComponent <Visitor> ();
        _ui                   = g.GetComponent <UI> ();
        _gametime             = g.GetComponent <GameTime> ();
        _startNewConversation = g.GetComponent <StartNewConversation> ();
        _Cond                 = g.GetComponent <Conditions>();
        _Diag                 = g.GetComponent <Dialogue> ();

        //invisible at first
        renderer.enabled = false;

        day = _gametime._currentDay;

        foreach (Transform child in transform)
        {
            if (child.name == "Alert")
            {
                alert = child;
                alert.renderer.enabled = false;
            }
            if (child.name == "Highlight")
            {
                light = child;
                light.renderer.enabled = false;
            }
        }
    }
Esempio n. 2
0
    public int _currentDay;                             // current day

    // =============================================== initialization
    // Use this for initialization
    void Start()
    {
        _gameWorld = this.GetComponent <GameWorld> ();
        _shelter   = this.GetComponent <Shelter> ();
        _rh        = this.GetComponent <ReportHandler> ();
        _reports   = new List <Report> ();
        _startConv = this.GetComponent <StartNewConversation> ();

        if (_visitors == null)
        {
            _visitors = this.GetComponent <Visitor> ();
        }

        // starting values
        _currentDay = 0;
    }
Esempio n. 3
0
    // ========================================================== initialization
    // Use this for initialization
    void Start()
    {
        _startNewConversation = this.GetComponent <StartNewConversation>();
        if (_shelter == null)
        {
            _shelter = g.GetComponent <Shelter> ();
        }
        if (_visitors == null)
        {
            _visitors = g.GetComponent <Visitor> ();
        }
        if (_gametime == null)
        {
            _gametime = g.GetComponent <GameTime> ();
        }
        if (_reports == null)
        {
            _reports = g.GetComponent <ReportHandler> ();
        }
        _gameWorld  = g.GetComponent <GameWorld> ();
        _Cond       = g.GetComponent <Conditions>();
        _newdayanim = g.GetComponent <NewDayAnim> ();

        foreach (Transform child in g.transform)
        {
            if (child.name == "BlackBox")
            {
                blackbox = child;
            }
            if (child.name == "Title")
            {
                title = child;
            }
        }

        charButtons = sideButtons = showButtons = showJournal = showHelp = false;

        showAllButtons = false;
        tutorial       = true;
        warning        = 0;

        index       = -1;
        animateSide = 500;
        fade        = 0;
        fading      = 0;
        credits     = false;


        boxStyle = new GUIStyle("box");

        buttonStyle = new GUIStyle("button");
        labelStyle  = new GUIStyle("Label");


        regular = (Font)Resources.Load("Arial", typeof(Font));
        bold    = (Font)Resources.Load("Arial Bold", typeof(Font));

        box     = (Texture2D)Resources.Load("boxBack", typeof(Texture2D));
        button1 = (Texture2D)Resources.Load("buttonBack", typeof(Texture2D));
        button2 = (Texture2D)Resources.Load("buttonBack2", typeof(Texture2D));
        button3 = (Texture2D)Resources.Load("buttonBack3", typeof(Texture2D));
        black   = (Texture2D)Resources.Load("black", typeof(Texture2D));
    }