Beispiel #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player"))
        {
            if (!Stage2_Controller._Stage2_Quest [16])
            {
                _Switch.SetActive(true);
                _LightFromSide.SetActive(true);
            }

            Stage2_Controller._Stage2_Quest[16] = true;
            Save_Script.Save_Quest_Info();

            if (Stage2_Controller._Stage2_Quest[17] && !Stage2_Controller._Stage2_Quest[22])
            {
                _Switch.SetActive(true);
                _LightFromSide.SetActive(false);

                Item_Controller aa = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> ();
                for (int i = 0; i < 5; i++)
                {
                    if (aa._item_name_list [i] == "태엽")
                    {
                        aa._consumable [i] = true;
                        break;
                    }
                }
                Stage2_Controller._Stage2_Quest[22] = true;
                Save_Script.Save_Quest_Info();
            }
        }
    }
    void Start()
    {
        ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        ti.Import(31);
        //Stage3 Save point 1//
        if (!Stage3_Controller.q [0])
        {
            Save_Script.Save_Now_Point();
        }
        //Stage3 Save point 1//

        if (GetComponent <Load_data> ()._where_are_you_from == 16)
        {
            //Debug.Log ("from 16");
            player.transform.position = regen_pos.position;
        }
        else
        {
            player.transform.position = start_pos.position;
        }
        if (Stage3_Controller.q[2])
        {
            bag.GetComponent <BoxCollider2D>().enabled = true;
        }
    }
Beispiel #3
0
    void Start()
    {
        //SS save//
        //print ("SS Saved");
        if (Selecting_stage._what_stage_now_cleared != 5)
        {
            Save_Script.Save_Now_Point();
        }
        PlayerPrefs.SetInt("Stage_Now_Cleared", Selecting_stage._what_stage_now_cleared);
        //SS save//

        if (Item_canvas && player)
        {
            Item_canvas.SetActive(false);
            player.transform.position = follow_it.transform.position;
        }


        if (PlayerPrefs.GetInt("Stage_Now_Cleared") != 5)
        {
            bp.CurrentPaper = PlayerPrefs.GetInt("Stage_Now_Cleared") + 1;
        }
        else
        {
            bp.CurrentPaper = PlayerPrefs.GetInt("Stage_Now_Cleared");
        }
    }
    void LateUpdate()
    {
        //static으로 고정필요

        if (msc[0].mirror_in_ornot)          //거울이 있을 때
        //xx[0].SetActive(false);
        {
            Mirror_Effect_Off(xx[0].GetComponent <SpriteRenderer>());
            transparent_walls[0].enabled = false;
            msc [0].mirror_in_ornot      = false;
            Destroy(msc [0].gameObject);
            Stage1_Controller._Stage1_Quest[6] = true;
            Save_Script.Save_Quest_Info();
        }
//		if (msc[1].mirror_in_ornot) {//거울이 있을 때
//			//xx[1].SetActive(false);
//			Mirror_Effect_Off(xx[1].GetComponent<SpriteRenderer>());
//			transparent_walls[1].enabled = false;
//			msc [1].mirror_in_ornot = false;
//			Destroy (msc [1].gameObject);
//			Stage1_Controller._Stage1_Quest[7] = true;
//		}
//		if (msc[2].mirror_in_ornot) {//거울이 있을 때
//			//xx[2].SetActive(false);
//			Mirror_Effect_Off(xx[2].GetComponent<SpriteRenderer>());
//			transparent_walls[2].enabled = false;
//			msc [2].mirror_in_ornot = false;
//			Destroy (msc [2].gameObject);
//			Stage1_Controller._Stage1_Quest[8] = true;
//		}
    }
    void Start()
    {
        _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));
        Ivon.SetActive(false);
        if (GetComponent <Load_data>()._where_are_you_from == 36)
        {
            player.transform.position = start_pos.position;
        }
        ti.Import(56);

        if (!Stage5_Controller.q[39])
        {
            rainFall.transform.parent.gameObject.GetComponent <DigitalRuby.RainMaker.RainScript2D>().RainIntensity = 0f;
        }

        if (Stage5_Controller.q[43])
        {
            babyDog.SetActive(true);
            Save_Script.Save_Now_Point();
        }
        else
        {
            babyDog.SetActive(false);
        }

        if (!Stage5_Controller.q[45])
        {
            umbrella.SetActive(false);
            hardbox.SetActive(false);
        }
    }
 void Q1_Move_Baby()
 {
     if (!q1a1)
     {
         Save_Script.Save_Now_Point();
         ti.Talk(); // 코코야 저기 봐 강아지가
         q1a1 = true;
     }
     else if (!Stage5_Controller.q[77])
     {
         mbr.enabled = false;
     }
     else if (Stage5_Controller.q[77] && !q1a2)
     {
         mbr.Moving_Right(8f);
         if (babyDog.transform.position.x <= player.transform.position.x)
         {
             babyDog.transform.position = new Vector2(player.transform.position.x, this.transform.position.y);
         }
         if (player.transform.position.x >= 13f)
         {
             q1a2 = true;
         }
     }
     else if (q1a2 && !q1a3)
     {
         ti.Talk(3); // 어떡해 감기걸리겟어
         q1a3 = true;
     }
 }
    void Start()
    {
        active    = true;
        leftSound = GetComponent <AudioSource> ();
        GameObject.FindWithTag("Player").transform.position = startPos.transform.position;
        Item_Canvas = GameObject.Find("Item_Canvas");
        ti          = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        ti.Import(37);
        //ti.Import (15);

        //GameObject _park = GameObject.FindWithTag("Controller").transform.GetChild (1).gameObject; // stop bgm
        //_park.SetActive(false);


        if (GameObject.Find("quest12_likelist(Clone)") != null)
        {
            Destroy(GameObject.Find("quest12_likelist(Clone)"));
        }

        GameObject.FindWithTag("Player").transform.localScale = new Vector3(0.6f, 0.6f, 1f);

        if (!Stage3_Controller.q[20])
        {
            Save_Script.Save_Now_Point();
            earphone_message = Instantiate(earphone_message, Vector3.zero, Quaternion.identity) as GameObject;
            earphone_message.transform.SetParent(Item_Canvas.transform, false);
        }
        Debug.Log(name + "buildIndex is " + SceneManager.GetActiveScene().buildIndex + "sceneIndex is " + Stage3_Controller.sceneIndex);
        if (Stage3_Controller.sceneIndex >= SceneManager.GetActiveScene().buildIndex)
        {
            lookingforIvon = true;
        }
        Stage3_Controller.sceneIndex = SceneManager.GetActiveScene().buildIndex;
        Debug.Log(name + "buildIndex is " + SceneManager.GetActiveScene().buildIndex + "sceneIndex is " + Stage3_Controller.sceneIndex);
    }
    void Update()
    {
        if (ic.cant_pick_during_using)
        {
            o_l_1.eraseRenderer = true;
            o_l_2.eraseRenderer = true;
        }

        if (puzzle_end)
        {
            Vector3 ss = Vector3.zero;
            wheels[0].transform.Rotate(new Vector3(0, 0, -10f));
            wheels[1].transform.Rotate(new Vector3(0, 0, -10f));
            dog_in_a_cart.transform.position = Vector3.SmoothDamp(dog_in_a_cart.transform.position, new Vector3(13.5f, 0, 7f), ref ss, 0.2f);
            if (Vector3.Distance(dog_in_a_cart.transform.position, new Vector3(13.5f, 0, 7f)) < 0.5f)
            {
                puzzle_end = false;
                dog_in_a_cart.SetActive(false);
                cart.SetActive(true);
                cart.transform.position = new Vector3(10.5f, -1.37f, 7f);
                player.SetActive(true);
                player.transform.position          = new Vector3(14.5f, -1.37f, 7f);
                Stage1_Controller._Stage1_Quest[3] = true;
                Save_Script.Save_Quest_Info();
                GameObject.Find("Main Camera").GetComponent <CameraManager> ().FocusObject = player;
            }
        }

        if (Stage1_Controller._Stage1_Quest[4] && !_coco_textbox.activeSelf)           //이동포인트 도착 후 대사 끝냄
        {
            portal_to_next.SetActive(true);
        }
    }
Beispiel #9
0
    void Q1_say_what_happen()
    {
        Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();

        aa.NPC_Say_yeah("코코");
        Stage1_Controller._Stage1_Quest[0] = true;
        Save_Script.Save_Quest_Info();
    }
 void Q6_1_Say_munch()
 {
     if (a2a2)
     {
         Stage2_Controller._Stage2_Quest[9] = true;
         Save_Script.Save_Quest_Info();
     }
 }
 void Q4_getPaper()      // 신문지 안 먹고 똥 자리 갔을 때는 어쩌지?
 {
     if (!q4a1 && player.transform.position.x >= cluePlace.position.x)
     {
         Save_Script.Save_Now_Point();
         ti.Talk(28); // 어 똥이 왜 없지
         q4a1 = true;
     }
 }
    void Start()
    {
        player        = GameObject.Find("Player");
        Ivon          = GameObject.Find("Ivon");
        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>();
        rainIntensity = rainFall.transform.parent.gameObject.GetComponent <DigitalRuby.RainMaker.RainScript2D>();

        _ivon_textbox = GameObject.FindGameObjectWithTag("Dialogue").transform.GetChild(2).GetComponent <Image>();
        _ivon_text    = GameObject.FindGameObjectWithTag("Dialogue").transform.GetChild(2).GetChild(0).GetComponent <Text>();

        player.transform.position = start_pos.position;
        ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        //sparkle.transform.position = GameObject.FindWithTag("Item_Canvas").transform.GetChild(1).GetChild(0).position;
        ti.Import(64);
        //ti.Talk();

        if (!Stage6_Controller.q[10])
        {
            Save_Script.Save_Now_Point();
            ti.Talk();
        }
        else if (Stage6_Controller.q[10] && !Stage6_Controller.q[11])
        {
            rainIntensity.RainIntensity = 0f;
            Ivon.SetActive(false);
            ti.Talk(10); // 응?
        }
        else if (Stage6_Controller.q[16] && !Stage6_Controller.q[17])
        {
            rainIntensity.RainIntensity = 0f;
            Ivon.SetActive(false);
            ti.Talk(29);
        }
        else if (Stage6_Controller.q[21] && !Stage6_Controller.q[22])
        {
            ti.Talk(39);
        }
        else if (Stage6_Controller.q[28] && !Stage6_Controller.q[29])
        {
            _ivon_textbox.rectTransform.rotation = Quaternion.Euler(new Vector3(0, 0, 0));
            _ivon_text.rectTransform.rotation    = Quaternion.Euler(new Vector3(0, 0, 0)); // 도대체 왜 돌려지지...
            ti.Talk(48);                                                                   // 코코야 왜 짖닝
            portal6_5.enabled         = false;
            ic._interaction_object[2] = "NPC";
            // player.GetComponent<Outline>().used_or_not_for_retry = false;
        }
        else if (Stage6_Controller.q[49] && !Stage6_Controller.q[50])
        {
            portal6_5.enabled         = false;
            ic._interaction_object[2] = "NPC";
            Ivon.GetComponent <Outline>().used_or_not_for_retry = false;
            ti.Talk(71); // 킄킄 이제 부적을 사용해서 돌아가자
        }
    }
Beispiel #13
0
    void Start()
    {
        mbr = player.GetComponent <Moving_by_RLbuttons>();
        Save_Script.Save_Now_Point();
        ti.Talk(); // 코코~
        mbr.enabled = false;

        player.transform.position = startpos.position;
    }
Beispiel #14
0
 void OnTriggerEnter2D()
 {
     if (!Stage3_Controller.q[1])
     {
         ti.NPC_Say_yeah(name);
         Stage3_Controller.q[1] = true;
         Save_Script.Save_Quest_Info();
     }
     //enabled = false;
 }
    void Start()
    {
        player = GameObject.FindWithTag("Player");
        player.transform.position = startPos.position;
        ti          = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2> ();
        item_Canvas = GameObject.FindWithTag("Item_Canvas");
        Save_Script.Save_Now_Point();

        ti.Import(43);
    }
Beispiel #16
0
 void Q19_put_star()
 {
     if (_star.gameObject.GetComponent <Outline> ().used_or_not_for_retry)
     {
         _star.gameObject.GetComponent <SpriteRenderer> ().color  = new Color(1, 1, 1, 1);
         _star.gameObject.GetComponent <SpriteRenderer> ().sprite = sTar;
         _dogdog.enabled = true;
         Stage2_Controller._Stage2_Quest[24] = true;
         Save_Script.Save_Quest_Info();
     }
 }
Beispiel #17
0
 void Q15_turn_modelight()
 {
     if (_mirror_use.GetComponent <Outline> ().used_or_not_for_retry)
     {
         _moode_code [0].SetActive(false);
         _moode_code [1].SetActive(true);
         _sparkle.SetActive(true);
         Stage2_Controller._Stage2_Quest[20] = true;
         Save_Script.Save_Quest_Info();
     }
 }
Beispiel #18
0
 void Q18_using_mirror()
 {
     if (_mirror_use_last.GetComponent <Outline> ().used_or_not_for_retry)
     {
         _sparkle1.SetActive(true);
         _mirror_use_last.GetComponent <SpriteRenderer> ().color  = new Color(1, 1, 1, 1);
         _mirror_use_last.GetComponent <SpriteRenderer> ().sprite = iVon;
         _star.enabled = true;
         Stage2_Controller._Stage2_Quest[23] = true;
         Save_Script.Save_Quest_Info();
     }
 }
 void Q1_conversation()
 {
     if (!q1a1)
     {
         //save point//
         Save_Script.Save_Now_Point();
         //save point//
         ti.Talk();
         q1a1 = true;
     }
     mbr.enabled = false;
 }
Beispiel #20
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>();

        player.transform.position = start_pos.position;
        ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
        ti.Import(67);
        Save_Script.Save_Now_Point();
        ti.Talk();
    }
 void Q3_Talk()
 {
     if (a1a1)
     {
         //여기에 천둥소리 약하게 하나 넣어야 함.
         Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> ();
         aa.currLineArr [0] += 2;            //코코 다음대사 치게함.
         aa.NPC_Say_yeah("코코");
         a1a1 = false;
         Stage2_Controller._Stage2_Quest[2] = true;
         Save_Script.Save_Quest_Info();
     }
 }
Beispiel #22
0
    void Update()
    {
        if (!Stage1_Controller._Stage1_Quest[0])
        {
            Q1_say_what_happen();
        }


        if (!mirror)
        {
            Stage1_Controller._Stage1_Quest[1] = true;
            Save_Script.Save_Quest_Info();
        }
    }
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public void Get_Item(GameObject item ,string item_name, Sprite item_image, bool usable, string interaction, bool consumable, string explanation)
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        if (cant_pick_during_using) {
            _getItem.Play ();

            for (int i = 0; i < 5; i++) {
                if (_item_name_list [i] == item_name) {//이미 같은 이름의 아이템이 있을 경우
                    _the_number_of_items [i]++;//갯수 하나 늘림
                    _item_list [i].transform.parent.GetComponentInChildren<Text> ().text = _the_number_of_items [i].ToString ();
                    Destroy (item);

                    if (onofflist.OnOffButton.localScale.x == 1) { //아이템창이 꺼져있는 상태면
                        onofflist.TurnOnOffitemList();
                    }

                    Save_Script.Save_Item_Info ();
                    return;
                    //StartCoroutine (Item_name_popup (item_name));
                }
            }
            for (int i = 0; i < 5; i++) {
                if (_item_name_list [i] == "") {//빈 아이템 창일 경우
                    _item_name_list [i] = item_name;//이름 입력
                    _the_number_of_items [i]++;//갯수 1
                    _interaction_object [i] = interaction;// 인터랙션 가능한 물체 입력
                    _usable_item [i] = usable;//사용가능여부 입력
                    _item_list [i].transform.parent.GetComponentInChildren<Text> ().text = _the_number_of_items [i].ToString ();
                    _item_list [i].GetComponent<Image> ().color = new Color (1, 1, 1, 1);
                    _item_list [i].transform.parent.GetComponentInChildren<Text> ().color = new Color (1, 1, 1, 1);
                    _item_list [i].GetComponent<Image> ().sprite = item_image;//이미지 입력
                    _consumable [i] = consumable;
                    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    _explanations [i] = explanation;
                    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    Destroy (item);

                    if (onofflist.OnOffButton.localScale.x == 1) { //아이템창이 꺼져있는 상태면
                        onofflist.TurnOnOffitemList();
                    }

                    Save_Script.Save_Item_Info ();
                    return;
                }
            }

        }
        return;
    }
    void Q3_Last()
    {
        Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> ();

        //aa.currLineArr [1] += 2;//별감 다음대사 치게함.

        if (!a4 && !a5)
        {
            StartCoroutine("WhiteOut");
            if (ringandstar [0].activeSelf)
            {
                ringandstar [0].GetComponent <BoxCollider2D> ().enabled = true;
            }
            a5 = true;
        }

        if (!a3 && a4 && bbb)
        {
            //print ("1");
            aa.NPC_Say_yeah("별감");
            _star_textbox = GameObject.Find("별감_text");
            a3            = true;
        }


        if (!a1 && a3 && !_star_textbox.activeSelf)
        {
            //print ("2");
            aa.currLineArr [0] += 2;            //코코 다음대사 치게함.
            aa.NPC_Say_yeah("코코");
            _coco_textbox = GameObject.Find("코코_text");
            a1            = true;
        }

        if (!a2 && a1 && !_coco_textbox.activeSelf)
        {
            //print ("3");
            aa.currLineArr [1] += 2;            //별감 다음대사 치게함.
            aa.NPC_Say_yeah("별감");
            a2 = true;
        }

        if (a2 && !_star_textbox.activeSelf)
        {
            //print ("4");
            Stage1_Controller._Stage1_Quest[9] = true;
            Save_Script.Save_Quest_Info();
        }
    }
 void Start()
 {
     player    = GameObject.FindGameObjectWithTag("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>();
     rainIntensity = rainFall.transform.parent.gameObject.GetComponent <DigitalRuby.RainMaker.RainScript2D>();
     //  Portal.enabled = false;
     player.transform.position = start_pos.position;
     ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>();
     ti.Import(62);
     Save_Script.Save_Now_Point();
     ti.Talk();
 }
Beispiel #26
0
    void Q5_multiTap()
    {
        if (a3a3)
        {
            multiTap [0].GetComponent <BoxCollider2D> ().enabled = true;
            multiTap [1].GetComponent <BoxCollider2D> ().enabled = true;
            a3a3 = false;
        }

        if (!multiTap [0])
        {
            Stage2_Controller._Stage2_Quest[4] = true;
            Save_Script.Save_Quest_Info();
        }
    }
    void Q8_Turn_it_on()
    {
        if (_Audio.used_or_not_for_retry)
        {
            _SoundEffect.SetActive(true);
            //	_classical.SetActive (true);
            //	_classical.transform.SetParent (GameObject.Find ("Stage2_Controller").transform);
            GameObject _audiosound = GameObject.FindWithTag("Controller").transform.GetChild(2).gameObject;
            _audiosound.SetActive(true);

            portal_to_2_4.SetActive(true);
            GetComponent <BoxCollider2D> ().enabled = false;
            Stage2_Controller._Stage2_Quest[12]     = true;
            Save_Script.Save_Quest_Info();
        }
    }
    void OnTriggerEnter2D(Collider2D other)      //이동포인트에 도착.
//		if (other.gameObject == player) {
//			//말하고 뒤로 자동으로 움직임?
//			mbr.enabled = false;
//			StartCoroutine ("Backback");
//		}
    {
        Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();

        aa.currLineArr [0] += 2;        //코코 다음대사로 넘김
        aa.NPC_Say_yeah("코코");
        Stage1_Controller._Stage1_Quest[4] = true;

        Save_Script.Save_Quest_Info();
        _coco_textbox = GameObject.Find("코코_text");
    }
Beispiel #29
0
    void Q2_remove_partOfmirror()
    {
        if (msc.mirror_in_ornot)          //거울을 빼면,

        {
            Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();
            aa.currLineArr [0] += 2;            //코코 다음대사로 넘김
            aa.NPC_Say_yeah("코코");

            transparent_wall.enabled = false;
            //broken_bridge.SetActive (true);
            StartCoroutine("Mirror_Effect");
            Destroy(GameObject.Find("Mirror_Socket"));
            Stage1_Controller._Stage1_Quest[2] = true;
            Save_Script.Save_Quest_Info();
        }
    }
    void Start()
    {
        player = GameObject.FindWithTag("Player");
        player.transform.position = startPos.position;
        item_Canvas = GameObject.FindWithTag("Item_Canvas");
        ti          = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();
        conv        = new bool[10];

        //ti.Import(25); // test
        textbox_Coco   = ti._text_boxes [0];
        textbox_Star   = ti._text_boxes [1];
        textbox_Racoon = ti._text_boxes [2];
        textbox_Ivon   = ti._text_boxes [3];

        Save_Script.Save_Now_Point();
        Stage4_Controller.q [16] = false;         // test
    }