예제 #1
0
    void Awake()
    {
        cardsVec [0] = new Vector3(-150, 0, 0);
        cardsVec [1] = new Vector3(-150, 0, 0);
        cardsVec [2] = new Vector3(150, 0, 0);
        cardsVec [3] = new Vector3(150, 0, 0);
        cardsVec [4] = new Vector3(160, 0, 0);

        speakVec [0] = new Vector3(-125, 80, 0);
        speakVec [1] = new Vector3(-125, 80, 0);
        speakVec [2] = new Vector3(125, 80, 0);
        speakVec [3] = new Vector3(125, 80, 0);
        speakVec [4] = new Vector3(125, 80, 0);

        cardsObj = Helper.primitiveLoad("Prefabs/Cards", transform, Vector3.zero);
        headObj  = Helper.primitiveLoad("Prefabs/Head", transform);
        speakObj = Helper.primitiveLoad("Prefabs/Speak", transform, Vector3.zero);

        Cards cards = cardsObj.AddComponent <Cards> ();
        Head  head  = headObj.AddComponent <Head> ();

        bipaiObj = head.BipaiObject();

        speakObj.SetActive(false);
        cardsObj.SetActive(false);
        bipaiObj.SetActive(false);

        UIEventListener.Get(bipaiObj).onClick = onClickBipai;
    }