コード例 #1
0
ファイル: CityState.cs プロジェクト: sooncat/ProjectRougeLike
    public override void Enter(GameStateParameter parameter)
    {
        base.Enter(parameter);

        EventSys.Instance.AddHander(InputEvent.CityExit, OnCityExitEvent);
        EventSys.Instance.AddHander(InputEvent.CityStartFight, OnCityStartFightEvent);
    }
コード例 #2
0
    public override void Enter(GameStateParameter parameter)
    {
        base.Enter(parameter);

        _fState        = FSubState.SelectHero;
        _selectedHeros = new Dictionary <int, int>();

        FightStateParameter fsParameter = (FightStateParameter)parameter;

        _stageName = fsParameter.nextType;

        EventSys.Instance.AddHander(InputEvent.FightExit, OnExitEvent);
        EventSys.Instance.AddHander(InputEvent.FightReady, OnFightReadyEvent);
        EventSys.Instance.AddHander(InputEvent.FightNodeClicked, OnClickFightNodeEvent);
        EventSys.Instance.AddHander(InputEvent.FightDragOnNode, OnFightDragOnNode);
        EventSys.Instance.AddHander(InputEvent.FightDragOnHero, OnFightDragOnHero);
        EventSys.Instance.AddHander(InputEvent.FightDragAllOnNode, OnFightDragAllOnNode);

        EventSys.Instance.AddHander(LogicEvent.FightLoseReturnToStage, OnFightLoseReturnToStage);
        EventSys.Instance.AddHander(LogicEvent.FightWinReturnToStage, OnFightWinReturnToStage);

        EventSys.Instance.AddHander(InputEvent.StageNodeClicked, OnStateNodeClicked);
        EventSys.Instance.AddHander(InputEvent.StageHeroNodeClicked, OnStateHeroNodeClicked);

        EventSys.Instance.AddHander(InputEvent.FightNodeDetailComfirmed, (param1, param2) => { });
        EventSys.Instance.AddHander(InputEvent.RewardNodeDetailComfirmed, (param1, param2) => { });
        EventSys.Instance.AddHander(InputEvent.RewardNodeGet, GetReward);
    }
コード例 #3
0
    public override void Enter(GameStateParameter parameter)
    {
        CatDebug.LogFunc();

        base.Enter(parameter);

        EventSys.Instance.AddHander(InputEvent.LoginLogin, OnLoginEvent);
    }
コード例 #4
0
    public virtual void Enter(GameStateParameter parameter)
    {
        CatDebug.LogFuncInStack(1);

        EventSys.Instance.AddHander(LogicEvent.SceneLoadEnd, OnSceneLoaded);
        EventSys.Instance.AddHander(FrameEvent.PreloadEnd, OnPreLoadEnd);
        EventSys.Instance.AddHander(LogicEvent.UiInsEnd, OnUiLoaded);

        EventSys.Instance.AddEvent(LogicEvent.EnterState, GetType());

        StartLoad();
    }
コード例 #5
0
    void OnChangeState(object p1, object p2)
    {
        Type t = (Type)p1;

        _willStateParameter = null;
        if (p2 != null)
        {
            _willStateParameter = (GameStateParameter)p2;
        }

        ChangeState(t);
    }