// void Awake() { // load Nurture.Calendar calendar = loadCalendar(); _mainCharacter = loadMainCharacter(calendar); loadAllStat(_mainCharacter); Story.TargetCharacter targetCharacter = loadTargetCharacter(); // story _storyMode = new Story.Mode(targetCharacter); // nurture _nurtureMode = new Nurture.Mode(calendar, _mainCharacter); // board game _boardGameMode = new BoardGame.BoardGameMode(); // combat _combatMode = new Combat.CombatMode(); // events _endNurtureEvent = new EndNurtureEvent(); // attach handler NurtureMode.Schedule.EndEvent.Attach(onScheduleEnd); }
// void Awake() { Story.Mode storyMode = Manager.Instance.Object.StoryMode; storyMode.CmdLinesEvent.Attach(onCmdLines); storyMode.CmdTextEvent.Attach(onCmdText); Hide(); }
private void onClick() { SwitchPanel switchPanel = Manager.Instance.UI.StoryPanel.SwitchPanel; Story.Mode storyMode = Manager.Instance.Object.StoryMode; switchPanel.HideAllCase(); storyMode.CaseKey = _key; storyMode.NextCmd(); switchPanel.Hide(); }
// Use this for initialization void Awake() { _seAudioSource = gameObject.AddComponent <AudioSource>(); _seAudioSource.loop = false; GameObject o = Instantiate(PrefFadePanel); o.transform.SetParent(transform, false); _fadePanel = o.GetComponent <FadePanel>(); // attach event handler Story.Mode storyMode = Manager.Instance.Object.StoryMode; storyMode.CmdAppearEvent.Attach(onCmdAppear); storyMode.CmdFilterEvent.Attach(onCmdFilter); storyMode.CmdBackgroundEvent.Attach(onCmdBackground); storyMode.CmdPictureEvent.Attach(onCmdPicture); storyMode.CmdSEEvent.Attach(onCmdSE); storyMode.CmdTargetAppearEvent.Attach(onCmdTargetAppear); storyMode.CmdDisappearEvent.Attach(onCmdDisappear); storyMode.ScenarioStartEvent.Attach(onScenarioStart); storyMode.ScenarioEndEvent.Attach(onScenarioEnd); }