Ejemplo n.º 1
0
    void Awake()
    {
        //개발 후 삭제//
        if (Stage3_Controller._stage3_q1)
        {
            Destroy(aaaaaa[0]);
            Destroy(aaaaaa[1]);
            Destroy(aaaaaa[2]);
        }
        //개발 후 삭제//

        player    = GameObject.Find("Player");
        start_pos = GameObject.Find("Start_Pos").transform;
        regen_pos = GameObject.Find("Regen_Pos").transform;
        player.transform.position = start_pos.position;

        if (!Stage3_Controller._stage3_q1)
        {
            Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();
            aa.Import();
            player.transform.localScale = new Vector3(1.4f, 1.4f, player.transform.localScale.z);
        }

        if (Stage3_Controller._stage3_q4_1)
        {
            Destroy(bag);
        }
    }
Ejemplo n.º 2
0
    void Start()
    {
        itemCanvas = GameObject.FindWithTag("Item_Canvas");
        ti         = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();
        ti.Import(25);          // temp code
        textbox_Coco   = ti._text_boxes [0];
        textbox_Star   = ti._text_boxes [1];
        textbox_Racoon = ti._text_boxes [2];
        textbox_Ivon   = ti._text_boxes [3];

        Stage4_Controller.q [20] = true;         // temp code
        roundBoard = GameObject.Find("Round").GetComponent <Text> ();
        scoreBoard = GameObject.Find("Score").GetComponent <Text> ();
        timeBoard  = GameObject.Find("Time").GetComponent <Text> ();
        returnRandom();


        tempPos  = new Vector3[2];
        velocity = new Vector3[2];
        for (int i = 0; i < velocity.Length; i++)
        {
            velocity [i] = Vector3.zero;
        }
        getTempTransform = false;
        message_mix.SetActive(false);
        timeBoard.gameObject.SetActive(false);

        ti.NPC_Say_yeah("너굴맨");
    }
Ejemplo n.º 3
0
    void Awake()
    {
        player    = GameObject.Find("Player");
        start_pos = GameObject.Find("Start_Pos").transform;
        regen_pos = GameObject.Find("Regen_Pos").transform;
        player.transform.position = start_pos.position;

        if (!Stage1_Controller._Stage1_Quest[0])
        {
            Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();
            aa.Import();
        }
    }
Ejemplo n.º 4
0
    //Test용//
//	public GameObject a1;
//	public GameObject b1;

    void Awake()
    {
        player    = GameObject.Find("Player");
        start_pos = GameObject.Find("Start_Pos").transform;
        regen_pos = GameObject.Find("Regen_Pos").transform;
        player.transform.position = start_pos.position;
        ic  = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> ();
        s2c = GameObject.Find("Stage2_Controller").GetComponent <Stage2_Controller> ();

        if (!Stage2_Controller._Stage2_Quest[0])
        {
            Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> ();

            aa.Import();
            //s2c._ti_stage2 = aa;
            s2c.ic = ic;
            //s2c._dialogue_Canvas = GameObject.FindWithTag ("Dialogue");
            player.transform.localScale = new Vector3(1.4f, 1.4f, player.transform.localScale.z);
        }
    }
Ejemplo n.º 5
0
    public void Skip_to()
    {
        player.SetActive(true);
        item_Canvas.SetActive(true);
        DontDestroyOnLoad(dialogue_Canvas);
        ic = item_Canvas.GetComponent <Item_Controller> ();
        ti = dialogue_Canvas.GetComponent <Text_Importer> ();

        SceneManager.LoadScene(15);

        ic._item_name_list [0]      = "Diary";
        ic._item_name_list [1]      = "Star";
        ic._usable_item [0]         = false;
        ic._usable_item [1]         = true;
        ic._the_number_of_items [0] = 1;
        ic._the_number_of_items [1] = 1;
        ic._interaction_object [0]  = "";
        ic._interaction_object [1]  = "Player";
        ic._consumable [0]          = false;
        ic._consumable [1]          = false;
        ic._explanations [0]        = "Test용으로 넘어옴";
        ic._explanations [1]        = "Test용으로 넘어옴";
        for (int xx = 0; xx < ic._item_list.Length; xx++)
        {
            if (ic._item_name_list [xx] != "")
            {
                Texture2D assas = (Texture2D)Resources.Load("ItemPictures/" + ic._item_name_list [xx]);
                Rect      r     = new Rect(0, 0, assas.width, assas.height);
                ic._item_list [xx].GetComponent <Image> ().sprite = Sprite.Create(assas, r, new Vector2(0, 0));
                ic._item_list [xx].GetComponent <Image> ().color  = new Color(1, 1, 1, 1);
                ic._item_list [xx].transform.parent.GetComponentInChildren <Text> ().text  = ic._the_number_of_items [xx].ToString();
                ic._item_list [xx].transform.parent.GetComponentInChildren <Text> ().color = new Color(1, 1, 1, 1);
            }
        }

        ti.Import(15);
        _stage3_Controller.SetActive(true);
        DontDestroyOnLoad(_stage3_Controller);
    }
    public void Restart()
    {
        if (PlayerPrefs.GetInt("Restart_SceneNum") != 0 && PlayerPrefs.GetInt("Restart_SceneNum") != 3)
        {
            player.SetActive(true);
            item_Canvas.SetActive(true);
            DontDestroyOnLoad(dialogue_Canvas);

            SceneManager.LoadScene(PlayerPrefs.GetInt("Restart_SceneNum"));

            ic = item_Canvas.GetComponent <Item_Controller> ();
            ic._item_name_list      = PlayerPrefsX.GetStringArray("IC_nameList");
            ic._usable_item         = PlayerPrefsX.GetBoolArray("Usable_item");
            ic._the_number_of_items = PlayerPrefsX.GetIntArray("NumOfItem");
            ic._interaction_object  = PlayerPrefsX.GetStringArray("Interaction");
            ic._consumable          = PlayerPrefsX.GetBoolArray("Consumable");
            for (int xx = 0; xx < ic._item_list.Length; xx++)
            {
                if (ic._item_name_list [xx] != "")
                {
                    Texture2D assas = (Texture2D)Resources.Load("ItemPictures/" + ic._item_name_list [xx]);
                    Rect      r     = new Rect(0, 0, assas.width, assas.height);
                    ic._item_list [xx].GetComponent <Image> ().sprite = Sprite.Create(assas, r, new Vector2(0, 0));
                    ic._item_list [xx].GetComponent <Image> ().color  = new Color(1, 1, 1, 1);
                    ic._item_list [xx].transform.parent.GetComponentInChildren <Text> ().text  = ic._the_number_of_items [xx].ToString();
                    ic._item_list [xx].transform.parent.GetComponentInChildren <Text> ().color = new Color(1, 1, 1, 1);
                }
            }


            ti = dialogue_Canvas.GetComponent <Text_Importer> ();
            if (PlayerPrefs.GetInt("Restart_SceneNum") >= 4 && PlayerPrefs.GetInt("Restart_SceneNum") <= 10)
            {
                ti.Import(4);
                _Controllers [0].SetActive(true);
                DontDestroyOnLoad(_Controllers [0]);
            }
            if (PlayerPrefs.GetInt("Restart_SceneNum") >= 11 && PlayerPrefs.GetInt("Restart_SceneNum") <= 14)
            {
                ti.Import(11);
                _Controllers [1].SetActive(true);
                DontDestroyOnLoad(_Controllers [1]);
                //음악을 달아야 한다.
            }
            ti.currLineArr = PlayerPrefsX.GetIntArray("CurrArr");

            Stage1_Controller._Stage1_Quest        = PlayerPrefsX.GetBoolArray("Stage1_Quest");
            Stage2_Controller._Stage2_Quest        = PlayerPrefsX.GetBoolArray("Stage2_Quest");
            Stage2_Controller._Stage2_Quest_intArr = PlayerPrefsX.GetIntArray("Stage2_Quest_INT");

//			if (PlayerPrefs.GetInt ("Restart_SceneNum") >= 11 && PlayerPrefs.GetInt ("Restart_SceneNum") <= 14) {
//				ti.Import (11);
//			}
        }

        if (PlayerPrefs.GetInt("Restart_SceneNum") == 3)
        {
            //stage select로 넘어갈 때는
            //안할경우 퀘스트 목록이 지워짐.
            player.SetActive(true);
            item_Canvas.SetActive(true);
            SceneManager.LoadScene(PlayerPrefs.GetInt("Restart_SceneNum"));
        }
    }