protected void Start() { //Assign a Horoscope Randomly if (Horoscope == Horoscopes.Random) { Horoscope = (Horoscopes)Random.Range(0, 11); } //Snap character into allignment transform.position = new Vector3(x, y, -1); //Assign the renderer component for reference Renderer = GetComponent <SpriteRenderer>(); }
//根据星座类型得到星座信息 public Horoscopes getStarByType(int type) { int iconId = StarSampleManager.Instance.getIconId(type); string name = StarSampleManager.Instance.getName(type); string language = LanguageConfigManager.Instance.getLanguage(StarSampleManager.Instance.getLanguageId(type)); string date = LanguageConfigManager.Instance.getLanguage(StarSampleManager.Instance.getLanguageId(type) + "date"); string skill = LanguageConfigManager.Instance.getLanguage(StarSampleManager.Instance.getLanguageId(type) + "Sdescribe"); string passive = LanguageConfigManager.Instance.getLanguage(StarSampleManager.Instance.getLanguageId(type) + "Pdescribe"); string spriteName = "horStar" + type; Horoscopes star = new Horoscopes(type, language, name, iconId, date, spriteName, skill, passive); return(star); }
IEnumerator showUI() { yield return(new WaitForSeconds(0.1f)); Horoscopes info = HoroscopesManager.Instance.getStarByType(horSid); icon.alpha = 0; if (CommandConfigManager.Instance.getNvShenClothType() == 0) { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + info.getImageID() + "c", icon); } else { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + info.getImageID(), icon); } iTween.ShakePosition(this.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f)); iTween.ShakePosition(this.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f)); yield return(new WaitForSeconds(0.1f)); EffectManager.Instance.CreateEffectCtrlByCache(icon.transform, "Effect/UiEffect/GoddessAppears", (passobj, effectCtrl) => { passobj.obj.transform.parent = icon.transform; passobj.obj.transform.localScale = Vector3.one; passobj.obj.transform.localPosition = new Vector3(0, 0, -600); }); yield return(new WaitForSeconds(0.5f)); TweenAlpha ta1 = TweenAlpha.Begin(icon.gameObject, 2f, 1); ta1.from = 0; EventDelegate.Add(ta1.onFinished, () => { // int audioId = 400 + horSid; if (GameManager.Instance.skipStory) { showTalkWindowCallBack(); return; } AudioManager.Instance.PlayAudio(601); labelEffect(LanguageConfigManager.Instance.getLanguage("GuideTitles05", info.getName()), () => { initWalk(); }); }, true); }
/**显示兑换条件 */ private void updateCondition(BeastEvolve chooseItem) { if (selectedCard.uid == "" && !(fatherWindow is TeamEditWindow)) //召唤 { int index = BeastEvolveManagerment.Instance.getBeastIndexBySid(chooseItem.getBeast().sid) + 1; Horoscopes hores = HoroscopesManager.Instance.getStarByType(index); conditonPoint.SetActive(true); combatPoint.SetActive(false); inofPoint.SetActive(false); //nvshengSprite.spriteName= "horStar"+selectedCard.getTitleName(selectedCard.sid); nvshengLabel.text = hores.getName(); nvshengDayLabel.text = hores.getDate(); nvshengLabel.effectStyle = UILabel.Effect.Outline; nvshengLabel.effectColor = new Color32(0, 1, 0, 255); nvshengLabel.color = new Color32(0, 213, 255, 255); sample = selectedEvolve.getExchangeBySids(selectedEvolve.getNextBeast().sid); foreach (ExchangeCondition each in sample.conditions[0]) { if (each.costType == PrizeType.PRIZE_MONEY) { needMoneyLabel.text = each.num.ToString(); if (UserManager.Instance.self.getMoney() < each.num) { needMoneyLabel.text = Colors.RED + each.num.ToString(); } } else { propButton.updateButton(each, ButtonExchange.BEASTSUMMON); needPropNum = each.num; break; } } } else //进化 { conditonPoint.SetActive(false); combatPoint.SetActive(true); inofPoint.SetActive(true); } }
protected override void begin() { base.begin(); Horoscopes hs = HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star); usXingZuo.spriteName = hs.getSpriteName(); lblName.text = hs.getName(); xzname_ys.text = hs.getName(); lblDate.text = hs.getDate(); lblMyInfo.text = LanguageConfigManager.Instance.getLanguage("divine_05", UserManager.Instance.self.divineFortune.ToString()); // ResourcesManager.Instance.LoadAssetBundleTexture (ResourcesManager.NVSHENHEADPATH + hs.getImageID () + "_head", texNvShen); updateExp(); /* 奖励预览,满5(取5),满50(取50) */ List <ArenaAwardSample> awardSamples = ArenaAwardSampleManager.Instance.getSamplesByType(AWARD_TYPE); PrizeSample ps1 = null; PrizeSample ps2 = null; foreach (ArenaAwardSample a in awardSamples) { if (a.condition == 5) { if (a.prizes.Length != 0) { ps1 = a.prizes[0]; } } if (a.condition == 50) { if (a.prizes.Length != 0) { ps2 = a.prizes[0]; } } } if (ps1 != null && ps2 != null) { awardText01.text = LanguageConfigManager.Instance.getLanguage("divine_08", ps1.getPrizeName(), ps2.getPrizeName()); } MaskWindow.UnlockUI(); }
//开始祈祷动画 private void starPray(int ok) { if (ok != 0) { setp = 0; nextSetp = 1; prayStar = HoroscopesManager.Instance.getStarByType(ok); isPlayAnimation = true; coolTime = Mathf.Max(0, HoroscopesManager.Instance.getPrayTime() - ServerTimeKit.getSecondTime()); ; buttonPray.disableButton(true); if (ok == UserManager.Instance.self.star) { msgLabel.text = LanguageConfigManager.Instance.getLanguage("horoscopesPray02", prayStar.getName()); } else { msgLabel.text = LanguageConfigManager.Instance.getLanguage("horoscopesPray01", prayStar.getName()); } checkTime(); } }
public void initContent(WindowBase win) { this.win = win; buttonPray.content = this; buttonPray.fatherWindow = win; buttonPray.callback = starPray; beginMove = cardMove.transform.localPosition; coolTime = Mathf.Max(0, HoroscopesManager.Instance.getPrayTime() - ServerTimeKit.getSecondTime()); goddess.color = Color.black; myStar = HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star); starName.text = myStar.getName(); iconSprite.spriteName = myStar.getSpriteName(); beginTime = HoroscopesManager.Instance.getBeginTime(); endTime = HoroscopesManager.Instance.getEndTime(); checkTime(); timer = TimerManager.Instance.getTimer(UserManager.TIMER_DELAY); timer.addOnTimer(checkTime); timer.start(); ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + myStar.getImageID(), goddess); }