123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- using System;
- using UnityEngine;
- public class YotogiFreeSkillSelectManager : WfScreenChildren
- {
- public override void Awake()
- {
- base.Awake();
- this.yotogi_mgr_ = base.GetComponentInParent<YotogiManager>();
- this.load_asset_object = UTY.GetChildObject(base.root_obj, "FreeSkillSelectParent/FreeSkillSelect", false);
- this.free_skill_select_ = this.load_asset_object.AddComponent<FreeSkillSelect>();
- this.free_skill_select_.SetYotogiManager(this.yotogi_mgr_);
- this.ok_btn_ = UTY.GetChildObject(base.root_obj, "CommonPanel/UnderButtonGroup/Next", false).GetComponent<UIButton>();
- this.ok_btn_.onClick.Add(new EventDelegate(this, "OnClickOK"));
- this.chancel_btn_ = UTY.GetChildObject(base.root_obj, "CommonPanel/UnderButtonGroup/Cancel", false).GetComponent<UIButton>();
- this.chancel_btn_.onClick.Add(new EventDelegate(this, "OnClickCancel"));
- }
- protected override void OnCall()
- {
- if (this.load_asset_object.transform.parent != UTY.GetChildObject(base.root_obj, "FreeSkillSelectParent", false).transform)
- {
- this.load_asset_object.transform.SetParent(UTY.GetChildObject(base.root_obj, "FreeSkillSelectParent", false).transform, false);
- }
- this.ok_btn_.normalSprite = "cm3d2_common_okbuttom";
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- this.maid_ = this.yotogi_mgr_.maid;
- this.free_skill_select_.SetMaid(this.maid_);
- this.free_skill_select_.CreateInstanceButton();
- this.maid_.status.currentExcite = 0;
- this.yotogi_mgr_.is_free_mode = true;
- for (int i = 0; i < characterMgr.GetMaidCount(); i++)
- {
- Maid maid = characterMgr.GetMaid(i);
- if (!(maid == null))
- {
- maid.Visible = true;
- maid.AllProcPropSeqStart();
- }
- }
- characterMgr.GetMan(0).Visible = true;
- characterMgr.GetMan(0).AllProcPropSeqStart();
- }
- protected override bool IsCallFadeIn()
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (characterMgr.IsBusy())
- {
- return false;
- }
- if (!YotogiSkillSelectWaitMotion.ApplyMaidGesture(this.maid_, YotogiStage.GetAllDatas(true)[0]))
- {
- return false;
- }
- GameMain.Instance.MainCamera.SetTargetOffset(new Vector3((float)Screen.width / 256f * 208f - (float)Screen.width / 2f, 0f, 0f), false);
- Maid man = characterMgr.GetMan(0);
- for (int i = 0; i < characterMgr.GetMaidCount(); i++)
- {
- Maid maid = characterMgr.GetMaid(i);
- if (!(maid == null))
- {
- maid.SetPosOffset(Vector3.zero);
- if (1 <= i)
- {
- maid.Visible = false;
- }
- }
- }
- characterMgr.GetMan(0).Visible = false;
- this.free_skill_select_.FixSkill();
- return true;
- }
- private void OnClickOK()
- {
- if (this.yotogi_mgr_.null_mgr.IsExistNextLabel())
- {
- this.Finish();
- }
- }
- private void OnClickCancel()
- {
- if (string.IsNullOrEmpty(this.cancel_label))
- {
- return;
- }
- this.yotogi_mgr_.null_mgr.SetNextLabel(this.cancel_label);
- this.Finish();
- }
- protected override void OnFadeEnd()
- {
- this.free_skill_select_.FixSkill();
- GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
- if (this.yotogi_mgr_.null_mgr.IsExistNextLabel())
- {
- this.yotogi_mgr_.CallScreen(YotogiManager.CallScreenType.Null.ToString());
- }
- }
- public GameObject skill_select_prefab_object
- {
- get
- {
- return this.load_asset_object;
- }
- }
- public string cancel_label
- {
- get
- {
- return this.cancel_label_;
- }
- set
- {
- this.cancel_label_ = value;
- }
- }
- private Maid maid_;
- private YotogiManager yotogi_mgr_;
- private FreeSkillSelect free_skill_select_;
- private UIButton ok_btn_;
- private UIButton chancel_btn_;
- private GameObject load_asset_object;
- private string cancel_label_ = string.Empty;
- }
|