void Awake()
    {
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage5_3");

        sceneNo   = 53;
        player    = GameObject.Find("Player");
        mbr       = player.GetComponent <Moving_by_RLbuttons> ();
        start_pos = GameObject.Find("Start_Pos").transform;
        ic        = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> ();

        player.transform.position = start_pos.position;
    }
    void Start()
    {
        player    = GameObject.FindGameObjectWithTag("Player");
        Ivon      = GameObject.Find("Ivon");
        mbr       = player.GetComponent <Moving_by_RLbuttons>();
        start_pos = GameObject.Find("Start_Pos").transform;
        ic        = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>();

        _ivon_textbox = GameObject.FindGameObjectWithTag("Dialogue").transform.GetChild(2).GetComponent <Image>();
        _ivon_text    = GameObject.FindGameObjectWithTag("Dialogue").transform.GetChild(2).GetChild(0).GetComponent <Text>();
        _ivon_textbox.rectTransform.rotation = Quaternion.Euler(new Vector3(0, 180f, 0));
        _ivon_text.rectTransform.rotation    = Quaternion.Euler(new Vector3(0, 0, 0));

        sceneTrigger.enabled      = false;
        player.transform.position = start_pos.position;
        ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        ti.Import(65);
    }
Example #3
0
    void Awake()
    {
        //googleAnalytics.StartSession();
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Main_Select_Stage");

        player      = GameObject.FindGameObjectWithTag("Player");
        mbr         = player.GetComponent <Moving_by_RLbuttons> ();
        Item_canvas = GameObject.Find("Item_Canvas");
        for (int i = 0; i < 6; i++)
        {
            Stage_images [i].this_num = i;             //각 stage에 번호 부여
        }
        player.transform.localScale = new Vector3(1f, 1f, player.transform.localScale.z);
    }
Example #4
0
    void Awake()
    {
        if ((TextAsset)Resources.Load(SceneManager.GetActiveScene().buildIndex.ToString()) != null)
        {
            //텍스트파일을 Assets/Resources 안에 처넣어야만 한다. 그래야 빌드할 때 같이함
            _textfile  = (TextAsset)Resources.Load(SceneManager.GetActiveScene().buildIndex.ToString());
            _textLines = (_textfile.text.Split('\n'));

            player_moving = GameObject.Find("Player").GetComponent <Moving_by_RLbuttons> ();

            int line = 0;
            pNum           = int.Parse(_textLines [line++]);
            dialogArr      = new List <string> [pNum];
            currLineArr    = new int[pNum];
            nameArr        = new string[pNum];
            _text_in_boxes = new Text[pNum];
            _text_boxes    = new GameObject[pNum];
            _npc_collider  = new BoxCollider2D[pNum];
            pInd           = 0;

            for (int i = 0; i < pNum; i++)
            {
                dialogArr [i]      = new List <string> ();
                currLineArr [i]    = 0;
                nameArr [i]        = _textLines [line++];
                _text_in_boxes [i] = GameObject.Find(nameArr [i] + "_text").GetComponent <Text> ();

                _text_boxes [i]   = GameObject.Find(nameArr [i] + "_text");
                _npc_collider [i] = GameObject.Find(nameArr [i]).GetComponent <BoxCollider2D> ();
                //
                _text_boxes[i].transform.parent.gameObject.SetActive(false);
                //
                _text_boxes [i].SetActive(false);
                int leng = int.Parse(_textLines [line++]);

                for (int j = 0; j < leng; j++)
                {
                    dialogArr [i].Add(_textLines [line++]);
                }
            }
        }
    }
    void Awake()
    {
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage5_7_2");

        sceneNo   = 59;
        player    = GameObject.Find("Player");
        mbr       = player.GetComponent <Moving_by_RLbuttons>();
        start_pos = GameObject.Find("Start_Pos").transform;
        regen_pos = GameObject.Find("Regen_Pos").transform;
        ic        = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>();
        ti        = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();

        trashHeap = GameObject.Find("TrashHeap");
        hardBox   = GameObject.Find("HardBox");
    }
Example #6
0
    //ani//

    void Awake()
    {
        Debug.Log("item canvas awake");
        mbr       = GameObject.FindWithTag("Player").GetComponent <Moving_by_RLbuttons> ();
        onofflist = GetComponentInChildren <TurnOnOffItemList> ();
        DontDestroyOnLoad(transform.gameObject);
        cant_pick_during_using = true;
        for (int i = 0; i < 5; i++)
        {
            _item_name_list [i]     = "";
            _usable_item[i]         = false;
            _the_number_of_items[i] = 0;
            _interaction_object [i] = "";
            _consumable [i]         = false;
            _item_list [i].GetComponent <Image> ().color = new Color(255, 255, 255, 0);
            _item_list [i].transform.parent.GetComponentInChildren <Text> ().color = new Color(255, 255, 255, 0);
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            _explanations[i] = "";
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        }
    }
    void Awake()
    {
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage5_4");

        sceneNo = 54;
        player  = GameObject.Find("Player");
        mbr     = player.GetComponent <Moving_by_RLbuttons> ();
        //start_pos = GameObject.Find ("Start_Pos").transform;
        ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> ();

        //player.transform.position = start_pos.position;
        newsStand   = GameObject.Find("Newsstand");
        paper       = GameObject.Find("paper");
        IvonTextPos = GameObject.Find("IvonTextPos");
        IvonTextPos.SetActive(false);
    }
    void Awake()
    {
        //googleAnalytics.StartSession();
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage1_1x");

        player = GameObject.Find("Player");
        mbr    = player.GetComponent <Moving_by_RLbuttons> ();
        //Player_text = GameObject.Find ("코코_text").GetComponent<Text> ();
        start_pos = GameObject.Find("Start_Pos").transform;
        regen_pos = GameObject.Find("Regen_Pos").transform;
        player.transform.position = start_pos.position;

        sceneNo = 14;

        ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        ti.Import(14);
    }
    void Awake()
    {
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage5_2");

        sceneNo            = 52;
        player             = GameObject.Find("Player");
        mbr                = player.GetComponent <Moving_by_RLbuttons> ();
        start_pos          = GameObject.Find("Start_Pos").transform;
        ic                 = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> ();
        _dogsnack_not_item = GameObject.Find("DogSnack_notItem");
        rb2D               = _stardoll_afterused.GetComponent <Rigidbody2D>();
        dogBed             = GameObject.FindWithTag("Bed").GetComponent <BoxCollider2D>();

        player.transform.position = start_pos.position;
        _stardoll.SetActive(false);
        itemeat = false;
    }
    void Awake()
    {
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage5_6");

        sceneNo   = 56;
        player    = GameObject.Find("Player");
        Ivon      = GameObject.Find("Ivon");
        mbr       = player.GetComponent <Moving_by_RLbuttons>();
        start_pos = GameObject.Find("Start_Pos").transform;
        ic        = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>();
        ti        = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();

        babyDog     = GameObject.Find("BabyDog");
        umbrella    = GameObject.Find("Umbrella");
        hardbox     = GameObject.Find("HardBox");
        IvonTextPos = GameObject.Find("IvonTextPos");
    }
Example #11
0
    void Start()
    {
        player            = GameObject.FindGameObjectWithTag("Player");
        mbr               = player.GetComponent <Moving_by_RLbuttons>();
        start_pos         = GameObject.Find("Start_Pos").transform;
        ic                = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>();
        ic._now_used_item = "";

        ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        ti.Import(68);

        if (!Stage6_Controller.q[36])
        {
            player.transform.position = start_pos.position;
            ti.Talk();
        }
        else if (!Stage6_Controller.q[46])
        {
            q8a1 = true;
            player.transform.position = new Vector2(3.36f, -3.725002f);
            ti.Talk(39); // 부적은 줄수없어 썩 돌아가라
        }
    }
    void Awake()
    {
        Analyticslist = GameObject.FindGameObjectsWithTag("Analysis");
        if (Analyticslist.Length > 1)
        {
            Destroy(Analyticslist[0]);
        }
        googleAnalytics.LogScreen("Stage5_1");

        sceneNo   = 51;
        player    = GameObject.Find("Player");
        mbr       = player.GetComponent <Moving_by_RLbuttons> ();
        start_pos = GameObject.Find("Start_Pos").transform;
        regen_pos = GameObject.Find("Regen_Pos").transform;
        ic        = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> ();

        player.transform.position = start_pos.position;

        if (!Stage5_Controller.q[0])           // 첫 번째 퀘스트 깨기 전이면
        {
            mbr.enabled = false;
            print("엎드려있는ani");
        }
    }
Example #13
0
 void Awake()
 {
     player = GameObject.Find("Player");
     mbr    = player.GetComponent <Moving_by_RLbuttons> ();
 }
 void Awake()
 {
     player = GameObject.Find("Player");
     mbr    = player.GetComponent <Moving_by_RLbuttons> ();
     aa     = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer>();
 }