public void copulateIn() { PlayerDragon.SetActive(false); currentHouse.StateAction = EHouseStateAction.CLOSE; dragonController.isCopulate = true; HouseAction action = currentHouse.GetComponent <HouseAction>(); action.countdown.SetActive(true); action.countdownForeground.fillAmount = 1; EffectSupportor.Instance.fadeInAndDestroy(action.countdown, ESpriteType.UI_SPRITE, 0.8f); StartCoroutine(copulateChild(action, 1)); }
void initDragon() { PlayerDragon = Instantiate(Resources.Load <GameObject>("Prefab/Dragon/Player/Dragon")) as GameObject; PlayerDragon.transform.parent = PlayManager.Instance.Temp.Dragon.transform; PlayerDragon.transform.localPosition = Vector3.zero; PlayerDragon.transform.localScale = Vector3.one; //Stretch HP PlayerDragon.transform.GetChild(1).GetComponent <UIStretch>().container = GameObject.FindWithTag("Root"); dragonController = PlayerDragon.GetComponent <DragonController>(); //Stretch selected arrow dragonController.selected.transform.GetChild(0).GetComponent <UIStretch>().container = PlayManager.Instance.tempInit.cameraRender; }
void dragonComeOut() { PlayerDragon.SetActive(true); dragonController.isCopulate = false; }
public void Load() { int length; //PlayerPrefs.DeleteAll(); //userInfo = new UserInfo(); userInfo = userInfo.Load<UserInfo>(); dragonInfo = dragonInfo.Load<PlayerDragon>(); tutorialInfo.resetValue(); // reset lai tutorial trong game, chi xuat hien mot lan duy nhat trong 1 lan choi game cua nguoi choi userInfo.checkTutorialLevel = 0; userInfo.checkTutorialPlay = 0; userInfo.Save(); if (userInfo.check == 0) { reset(); //openAllMap(); } else { updateVersion(); } maps.DeleteAll(); enemies.DeleteAll(); dailyQuests.DeleteAll(); achievements.DeleteAll(); PlayerMap[] tempMap = this.maps.Load<PlayerMap>(); length = tempMap.Length; for (int i = 0; i < length; i++) { maps.Add(tempMap[i]); listMap.Add(tempMap[i].id, new PlayerMap(tempMap[i].id, tempMap[i].starSuccess, tempMap[i].starTotal)); } PlayerEnemy[] tempEnemy = this.enemies.Load<PlayerEnemy>(); length = tempEnemy.Length; for (int i = 0; i < length; i++) { enemies.Add(tempEnemy[i]); listEnemy.Add(tempEnemy[i].id, tempEnemy[i].visible); } PlayerDailyQuest[] tempDailyQuest = this.dailyQuests.Load<PlayerDailyQuest>(); length = tempDailyQuest.Length; for (int i = 0; i < length; i++) { dailyQuests.Add(tempDailyQuest[i]); listDailyQuest.Add(tempDailyQuest[i].id, tempDailyQuest[i].Amount); } PlayerAchievement[] tempAchievement = this.achievements.Load<PlayerAchievement> (); length = tempAchievement.Length; for(int i=0;i<length;i++) { achievements.Add(tempAchievement[i]); listAchievement.Add(tempAchievement[i].id, tempAchievement[i].value); } }
public void Load() { int length; //PlayerPrefs.DeleteAll(); //userInfo = new UserInfo(); userInfo = userInfo.Load <UserInfo>(); dragonInfo = dragonInfo.Load <PlayerDragon>(); tutorialInfo.resetValue(); // reset lai tutorial trong game, chi xuat hien mot lan duy nhat trong 1 lan choi game cua nguoi choi userInfo.checkTutorialLevel = 0; userInfo.checkTutorialPlay = 0; userInfo.Save(); if (userInfo.check == 0) { reset(); //openAllMap(); } else { updateVersion(); } maps.DeleteAll(); enemies.DeleteAll(); dailyQuests.DeleteAll(); achievements.DeleteAll(); PlayerMap[] tempMap = this.maps.Load <PlayerMap>(); length = tempMap.Length; for (int i = 0; i < length; i++) { maps.Add(tempMap[i]); listMap.Add(tempMap[i].id, new PlayerMap(tempMap[i].id, tempMap[i].starSuccess, tempMap[i].starTotal)); } PlayerEnemy[] tempEnemy = this.enemies.Load <PlayerEnemy>(); length = tempEnemy.Length; for (int i = 0; i < length; i++) { enemies.Add(tempEnemy[i]); listEnemy.Add(tempEnemy[i].id, tempEnemy[i].visible); } PlayerDailyQuest[] tempDailyQuest = this.dailyQuests.Load <PlayerDailyQuest>(); length = tempDailyQuest.Length; for (int i = 0; i < length; i++) { dailyQuests.Add(tempDailyQuest[i]); listDailyQuest.Add(tempDailyQuest[i].id, tempDailyQuest[i].Amount); } PlayerAchievement[] tempAchievement = this.achievements.Load <PlayerAchievement> (); length = tempAchievement.Length; for (int i = 0; i < length; i++) { achievements.Add(tempAchievement[i]); listAchievement.Add(tempAchievement[i].id, tempAchievement[i].value); } }