예제 #1
0
 void Start()
 {
     pickupScr = GameObject.Find("3D_SRH_001 (prefab v2)").GetComponent<Pickup>();
     guiScr = GameObject.Find("Menu").GetComponent<GuiScript>();
     canvasScr = GameObject.Find("Canvas (StartScene)").GetComponent<CanvasScript>();
     splashScreen.SetActive(false);
 }
예제 #2
0
    // set the object to not be destroyed on new scene loading
    void Awake()
    {
        //Debug.Log("created new grid");
        //if we don't have an [_instance] set yet
        if (!_instance)
            _instance = this;
        //otherwise, if we do, kill this thing
        else
            Destroy(this.gameObject);

        DontDestroyOnLoad(this.gameObject);

        //DontDestroyOnLoad(transform.gameObject);
    }
    // Use this for initialization
    //TurnOnPhone()
    void Start()
    {
        tsc = gameObject.GetComponent<TextStringCreation>();
        cs = (CanvasScript) canvas.GetComponent<CanvasScript>();
        cs.ResetAllLines ();

        tmm = new TextMessageMenu();
        mm = new MainMenu ();

        inboxTexts = new TextMessageCollection (inboxTextsJson, TextMessageCollection.CollectionType.Inbox);
        outboxTexts = new TextMessageCollection (outboxTextsJson, TextMessageCollection.CollectionType.Outbox);
        draftTexts = new TextMessageCollection (draftTextsJson, TextMessageCollection.CollectionType.Drafts);
        newlyWrittenText = new TextMessageCollection ("", TextMessageCollection.CollectionType.Create);

        cc = new ContactsCollection ();
        cc.LoadSavedContacts ();

        MainMenu.SetState (MainMenu.MainMenuState.Messages);
        TextMessageMenu.SetState (TextMessageMenu.TextMessageMenuState.Inbox);
        numberOnScreen = "";

        HandleHasUnreadMessages ();
        SetViewToHomeScreen ();

        if (hasReception)
        {
            receptionIcon.GetComponent<SpriteRenderer> ().sprite = hasReceptionSprite;
        }
        else
        {
            receptionIcon.GetComponent<SpriteRenderer> ().sprite = noReceptionSprite;
        }

        //example of adding a new contact
        //Contact c5 = new Contact ("lisa", "1234567");
        //cc.AddContactToContacts (c5, true);

        //example of adding a new inbox text
        //TextMessage txt1 = new TextMessage ("1234", "content txt1");
        //inboxTexts.HandleNewIncomingText(txt1, true);

        //example of adding a new outbox text
        //TextMessage outText = new TextMessage ("me", "my text message");
        //outboxTexts.AddTextToTexts(outText);
    }
    void Start()
    {
        GameObject canvas = GameObject.FindGameObjectWithTag ("PhoneCanvas");
        cs = (CanvasScript) canvas.GetComponent<CanvasScript>();
        cs.ResetAllLines ();

        GameObject phone = GameObject.FindGameObjectWithTag ("Phone");
        ps = (PhoneScript)phone.GetComponent<PhoneScript> ();

        tsc = ps.tsc;
    }
 // Use this for initialization
 void Awake()
 {
     canvasScript = GetComponentInParent<CanvasScript>();
     Gazable = false;
 }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     canvas = this;
     rotateAnimator = rotateHelp.GetComponent(typeof(Animator)) as Animator;
     rotateHelpShown = false;
 }
    //selected using alphaInput[alphaInputButtonIndex][alphaInputIndex]
    // Use this for initialization
    void Start()
    {
        alphaInput[0] = new string[] {" "};
        alphaInput [1] = new string[] {".", ",", "'", "\"", "?", "!", ":", ";", "-", "_", "(", ")", "1" };
        alphaInput [2] = new string[] {"a", "b", "c", "A", "B", "C", "2"};
        alphaInput [3] = new string[]{"d", "e", "f", "D", "E", "F", "3"};
        alphaInput [4] = new string[]{"g", "h", "i", "G", "H", "I", "4"};
        alphaInput [5] = new string[]{"j", "k", "l", "J", "K", "L", "5"};
        alphaInput [6] = new string[]{"m", "n", "o", "M", "N", "O", "6"};
        alphaInput [7] = new string[]{"p", "q", "r", "s", "P", "Q", "R", "S", "7"};
        alphaInput [8] = new string[]{"t", "u", "v", "T", "U", "V", "8"};
        alphaInput [9] = new string[]{"w", "x", "y", "z", "W", "X", "Y", "Z", "9"};

        GameObject canvas = GameObject.FindGameObjectWithTag ("PhoneCanvas");
        cs = (CanvasScript) canvas.GetComponent<CanvasScript>();

        GameObject phone = GameObject.FindGameObjectWithTag ("Phone");
        ps = (PhoneScript)phone.GetComponent<PhoneScript> ();

        m_textArea = "";
        this.enabled = false;
    }