void Start() { if (myScrollRect == null) { print("not OK"); } else { myScrollRect.verticalNormalizedPosition = 1; } alradyhaspaper = false; sprite_EN = Resources.Load <Sprite>("images/En_SpeechBubble"); sprite_FR = Resources.Load <Sprite>("images/FR_SpeechBubble"); sprite_ES = Resources.Load <Sprite>("images/ES_SpeechBubble"); sprite_Favorite_white = Resources.Load <Sprite>("images/FavoritesIcon_White"); sprite_Favorite_yellow = Resources.Load <Sprite>("images/StarOn"); sprite_Favorite_whiteyellow = Resources.Load <Sprite>("images/FavoritesIcon_Yellow"); Sprite[] SpritesData = Resources.LoadAll <Sprite>("images/SignsAll_001_128x128"); for (int i = 0; i < SpritesData.Length; i++) { singalAll.Add(SpritesData[i].name, SpritesData[i]); } myPanelOfState = PanelOfState.NoOneOpen; myPaperOfState = PaperOfState.PaperNone; }
void Mybutton(string mykey) { print(mykey); // isCategory = false; myPaperOfState = PaperOfState.PaperClose; controller mycontroller = controller.Instance; mycontroller.hideboradshowWord(mykey); ShowPanel(false); myPanelOfState = PanelOfState.NoOneOpen; }
//show a specified word, if there is already exist one, leave one then show. public void Randomword(word myword) { // paperPos.gameObject.SetActive(true); print("random"); if (!createAnimation.Instance.getPlaying()) { if (myPanelOfState != PanelOfState.NoOneOpen) { myPaperOfState = PaperOfState.PaperClose; ShowPanel(false); } else { if (alradyhaspaper) { if (myparperAni.enabled) { myparperAni.SetTrigger("leave"); } else { createAnimation.Instance.leavePaper(); } } else { if (myparperAni.enabled) { // myparperAni.SetTrigger("open"); ShowPaper(myword); } else { //createAnimation.Instance.openPaper(); ShowPaper(myword); } } alradyhaspaper = true; myPaperOfState = PaperOfState.PaperOpen; } } }