コード例 #1
0
ファイル: ObjectManager.cs プロジェクト: Kelicia91/Sugarism
    //
    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);
    }
コード例 #2
0
ファイル: DialoguePanel.cs プロジェクト: Kelicia91/Sugarism
    //
    void Awake()
    {
        Story.Mode storyMode = Manager.Instance.Object.StoryMode;
        storyMode.CmdLinesEvent.Attach(onCmdLines);
        storyMode.CmdTextEvent.Attach(onCmdText);

        Hide();
    }
コード例 #3
0
ファイル: CaseButton.cs プロジェクト: Kelicia91/Sugarism
    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();
    }
コード例 #4
0
    // 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);
    }