using System; using UnityEngine; public class YotogiFreeSkillSelectManager : WfScreenChildren { public override void Awake() { base.Awake(); this.yotogi_mgr_ = base.GetComponentInParent(); this.load_asset_object = UTY.GetChildObject(base.root_obj, "FreeSkillSelectParent/FreeSkillSelect", false); this.free_skill_select_ = this.load_asset_object.AddComponent(); this.free_skill_select_.SetYotogiManager(this.yotogi_mgr_); this.ok_btn_ = UTY.GetChildObject(base.root_obj, "CommonPanel/UnderButtonGroup/Next", false).GetComponent(); this.ok_btn_.onClick.Add(new EventDelegate(this, "OnClickOK")); this.chancel_btn_ = UTY.GetChildObject(base.root_obj, "CommonPanel/UnderButtonGroup/Cancel", false).GetComponent(); 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; }