void OnIQCardBtnClick() { UIButton btn = cardWidget.transform.Find("IQCard").GetComponent <UIButton>(); IQIndex++; if (IQIndex == 1) { SureState = CreatSureState.IQ_State_Dice1; SubtitlesManager.Instance.ShowSubtitle(1, 20, 2, "Knock", SubtitlePositionEnum.top); btn.enabled = false; } else if (IQIndex == 2) { SureState = CreatSureState.IQ_State_Dice2; SubtitlesManager.Instance.ShowSubtitle(1, 23, 2, "Knock", SubtitlePositionEnum.top); btn.enabled = false; } else if (IQIndex == 3) { SureState = CreatSureState.IQ_State_Dice3; SubtitlesManager.Instance.ShowSubtitle(1, 25, 2, "Knock", SubtitlePositionEnum.top); btn.enabled = false; } else { return; } DiceManager.Instance.ShowDicePanel(6, 0.01f, new DiceHander(SureIQDice)); }
void OnLuckyCardBtnClick() { luckyIndex++; UIButton btn = cardWidget.transform.Find("LuckyCard").GetComponent <UIButton>(); if (luckyIndex == 1) { SureState = CreatSureState.Lucky_State_Dice1; SubtitlesManager.Instance.ShowSubtitle(1, 28, 2, "Knock", SubtitlePositionEnum.top); btn.enabled = false; } else if (luckyIndex == 2) { SureState = CreatSureState.Lucky_State_Dice2; btn.enabled = false; } else if (luckyIndex == 3) { SureState = CreatSureState.Lucky_State_Dice3; btn.enabled = false; } else { return; } DiceManager.Instance.ShowDicePanel(6, 0.01f, new DiceHander(SureLuckyDice)); }
public static void StatureCardBtnClick_ToSubtitles_0() { SureState = CreatSureState.Stature_State_Dice1; UIButton btn = statureCard.GetComponent <UIButton>(); btn.onClick.Clear(); btn.onClick.Add(new EventDelegate(OnStatureCardBtnClick)); }
void ExpressReturnBtnClick() { SureState = CreatSureState.Idle_State; expressWidget.gameObject.SetActive(false); CameraManager.Instance.DrawCameraLens(CameraManager.CameraEnum.UICmera, Vector3.zero, 1, 0.08f); Container.gameObject.SetActive(false); CardTweenPositionInit(); }
static void OnStatureCardBtnClick() { UIButton btn = cardWidget.transform.Find("StatureCard").GetComponent <UIButton>(); statureIndex++; if (statureIndex == 1) { SureState = CreatSureState.Stature_State_Dice1; btn.enabled = false; } else if (statureIndex == 2) { SureState = CreatSureState.Stature_State_Dice2; btn.enabled = false; } else { return; } DiceManager.Instance.ShowDicePanel(6, 0.01f, new DiceHander(SureStatureDice)); }
void OnPropLabelWidgetBtnClick() { UIButton button = UIButton.current; fristDice.text = "?"; secondDice.text = "?"; if (button.name.Contains("stature")) { SureState = CreatSureState.Stature_State; GameObject statureCard = cardWidget.transform.Find("StatureCard").gameObject; UIButton btn = statureCard.GetComponent <UIButton>(); btn.enabled = true; TweenPosition tp = statureCard.GetComponent <TweenPosition>(); tp.enabled = true; tp.from = tp.gameObject.transform.localPosition; tp.to = new Vector3(-1.69f, 1.42f, 3.76f); tp.delay = 0; tp.onFinished.Clear(); tp.duration = 1.0f; tp.ResetToBeginning(); TweenRotation ts = statureCard.GetComponent <TweenRotation>(); ts.enabled = true; ts.from = ts.transform.rotation.eulerAngles; ts.to = new Vector3(0, 140, 0); ts.delay = 0; ts.duration = 1.0f; ts.ResetToBeginning(); Container.gameObject.SetActive(true); SubtitlesManager.Instance.ShowSubtitle(1, 0, 2); statureLabel.gameObject.SetActive(false); thridDice.text = "6"; dice3 = 6; } else if (button.name.Contains("power")) { SureState = CreatSureState.Power_State; GameObject powerCard = cardWidget.transform.Find("PowerCard").gameObject; TweenPosition tp = powerCard.GetComponent <TweenPosition>(); tp.enabled = true; tp.from = tp.gameObject.transform.localPosition; tp.to = new Vector3(-1.69f, 1.42f, 3.76f); tp.delay = 0; tp.onFinished.Clear(); tp.duration = 1.0f; tp.ResetToBeginning(); TweenRotation ts = powerCard.GetComponent <TweenRotation>(); ts.enabled = true; ts.from = ts.transform.rotation.eulerAngles; ts.to = new Vector3(0, 140, 0); ts.delay = 0; ts.duration = 1.0f; ts.ResetToBeginning(); Container.gameObject.SetActive(true); powerLabel.gameObject.SetActive(false); UIButton btn = powerCard.GetComponent <UIButton>(); btn.onClick.Clear(); btn.onClick.Add(new EventDelegate(OnPowerCardBtnClick)); btn.enabled = true; thridDice.text = "?"; dice3 = 10; } else if (button.name.Contains("VIT")) { SureState = CreatSureState.VIT_State; GameObject VITCard = cardWidget.transform.Find("VITCard").gameObject; TweenPosition tp = VITCard.GetComponent <TweenPosition>(); tp.enabled = true; tp.from = tp.gameObject.transform.localPosition; tp.to = new Vector3(-1.69f, 1.42f, 3.76f); tp.delay = 0; tp.onFinished.Clear(); tp.duration = 1.0f; tp.ResetToBeginning(); TweenRotation ts = VITCard.GetComponent <TweenRotation>(); ts.enabled = true; ts.from = ts.transform.rotation.eulerAngles; ts.to = new Vector3(0, 140, 0); ts.delay = 0; ts.duration = 1.0f; ts.ResetToBeginning(); Container.gameObject.SetActive(true); VITLabel.gameObject.SetActive(false); UIButton btn = VITCard.GetComponent <UIButton>(); btn.onClick.Clear(); btn.onClick.Add(new EventDelegate(OnVITCardBtnClick)); btn.enabled = true; thridDice.text = "?"; dice3 = 10; } else if (button.name.Contains("IQ")) { SureState = CreatSureState.IQ_State; GameObject IQCard = cardWidget.transform.Find("IQCard").gameObject; TweenPosition tp = IQCard.GetComponent <TweenPosition>(); tp.enabled = true; tp.from = tp.gameObject.transform.localPosition; tp.to = new Vector3(-1.69f, 1.42f, 3.76f); tp.delay = 0; tp.onFinished.Clear(); tp.duration = 1.0f; tp.ResetToBeginning(); TweenRotation ts = IQCard.GetComponent <TweenRotation>(); ts.enabled = true; ts.from = ts.transform.rotation.eulerAngles; ts.to = new Vector3(0, 140, 0); ts.delay = 0; ts.duration = 1.0f; ts.ResetToBeginning(); Container.gameObject.SetActive(true); IQLabel.gameObject.SetActive(false); UIButton btn = IQCard.GetComponent <UIButton>(); btn.onClick.Clear(); btn.onClick.Add(new EventDelegate(OnIQCardBtnClick)); btn.enabled = true; thridDice.text = "?"; dice3 = 10; } else if (button.name.Contains("lucky")) { SureState = CreatSureState.Lucky_State; GameObject luckyCard = cardWidget.transform.Find("LuckyCard").gameObject; TweenPosition tp = luckyCard.GetComponent <TweenPosition>(); tp.enabled = true; tp.from = tp.gameObject.transform.localPosition; tp.to = new Vector3(-1.69f, 1.42f, 3.76f); tp.delay = 0; tp.onFinished.Clear(); tp.duration = 1.0f; tp.ResetToBeginning(); TweenRotation ts = luckyCard.GetComponent <TweenRotation>(); ts.enabled = true; ts.from = ts.transform.rotation.eulerAngles; ts.to = new Vector3(0, 140, 0); ts.delay = 0; ts.duration = 1.0f; ts.ResetToBeginning(); Container.gameObject.SetActive(true); luckyLabel.gameObject.SetActive(false); UIButton btn = luckyCard.GetComponent <UIButton>(); btn.onClick.Clear(); btn.onClick.Add(new EventDelegate(OnLuckyCardBtnClick)); btn.enabled = true; thridDice.text = "?"; dice3 = 10; } else if (button.name.Contains("weiYan")) { SureState = CreatSureState.WeiYan_State; GameObject weiYanCard = cardWidget.transform.Find("WeiYanCard").gameObject; TweenPosition tp = weiYanCard.GetComponent <TweenPosition>(); tp.enabled = true; tp.from = tp.gameObject.transform.localPosition; tp.to = new Vector3(-1.69f, 1.42f, 3.76f); tp.delay = 0; tp.onFinished.Clear(); tp.duration = 1.0f; tp.ResetToBeginning(); TweenRotation ts = weiYanCard.GetComponent <TweenRotation>(); ts.enabled = true; ts.from = ts.transform.rotation.eulerAngles; ts.to = new Vector3(0, 140, 0); ts.delay = 0; ts.duration = 1.0f; ts.ResetToBeginning(); Container.gameObject.SetActive(true); weiYanLabel.gameObject.SetActive(false); UIButton btn = weiYanCard.GetComponent <UIButton>(); btn.onClick.Clear(); btn.onClick.Add(new EventDelegate(OnWeiYanCardBtnClick)); btn.enabled = true; thridDice.text = "?"; dice3 = 10; } }
protected override void OnShow() { SureState = CreatSureState.Idle_State; }