当前位置: 首页>>代码示例>>C#>>正文


C# State.Initialize方法代码示例

本文整理汇总了C#中State.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# State.Initialize方法的具体用法?C# State.Initialize怎么用?C# State.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在State的用法示例。


在下文中一共展示了State.Initialize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Generate

 public static State Generate(SyntaxNode declaration, SemanticModel semanticModel, OptionSet optionSet, bool isVariableDeclarationContext, CancellationToken cancellationToken)
 {
     var state = new State(isVariableDeclarationContext);
     state.Initialize(declaration, semanticModel, optionSet, cancellationToken);
     return state;
 }
开发者ID:jkotas,项目名称:roslyn,代码行数:6,代码来源:CSharpTypeStyleDiagnosticAnalyzerBase.State.cs

示例2: SetState

    public void SetState(State nextState)
    {
        Assert.IsNotNull(nextState, "Next State is NULL");
        Debug.Log("Passing from state " + currentState + " to " + nextState);
        // Change the pivot of the current menu to set it outside of view
        if (currentState)
            //this.currentState.GetComponent<RectTransform>().pivot = closedMenuPivot;
            currentState.gameObject.SetActive(false);

        // Initialize the next state
        nextState.Initialize();

        // Set the current state to be the next state
        currentState = nextState;

        // Set the next state to be in view
        //this.currentState.GetComponent<RectTransform>().pivot = openMenuPivot;
        currentState.gameObject.SetActive(true);
    }
开发者ID:khoavnguyen,项目名称:Unity-AR-Game-Explode-with-Friends,代码行数:19,代码来源:GameManager.cs

示例3: SessionGameStartedHandler

        void SessionGameStartedHandler(object sender, GameStartedEventArgs e)
        {
            if (Session.IsHost)
            {
                GlobalState = new GameState();
                GlobalState.Initialize(null);
            }
            else
            {
                GlobalState = new ClientState();
                GlobalState.Initialize(null);
            }

            GlobalState.LoadContent(Content);
            HookGameStateEvents();
        }
开发者ID:rdgoetz,项目名称:LessThanOk,代码行数:16,代码来源:LTO.cs

示例4: ReplayGameHandler

        void ReplayGameHandler(object sender, EventArgs e)
        {
            UnhookHomeStateEvents();

            GlobalState = new GameState();
            GlobalState.Initialize(null);
            GlobalState.LoadContent(Content);

            HookGameStateEvents();
        }
开发者ID:rdgoetz,项目名称:LessThanOk,代码行数:10,代码来源:LTO.cs

示例5: JoinGameHandler

        void JoinGameHandler(object sender, EventArgs e)
        {
            AvailableNetworkSessionCollection sessions = NetworkSession.Find(NetworkSessionType.SystemLink, 2, null);
            if (sessions.Count < 1)
                return;
            Session = NetworkSession.Join(sessions[0]);
            if (Session != null)
            {
                HookSessionEvents();

                UnhookHomeStateEvents();

                GlobalState = new LobbyState();
                GlobalState.Initialize(null);
                GlobalState.LoadContent(Content);

                HookLobbyStateEvents();
            }
        }
开发者ID:rdgoetz,项目名称:LessThanOk,代码行数:19,代码来源:LTO.cs

示例6: CreateGameHandler

        void CreateGameHandler(object sender, EventArgs e)
        {
            try
            {
                Session = NetworkSession.Create(NetworkSessionType.SystemLink, 2, 2);

                UnhookHomeStateEvents();

                GlobalState = new LobbyState();
                GlobalState.Initialize(null);
                GlobalState.LoadContent(Content);

                HookLobbyStateEvents();
                HookSessionEvents();
            }
            catch (Exception exception)
            {

            }
        }
开发者ID:rdgoetz,项目名称:LessThanOk,代码行数:20,代码来源:LTO.cs


注:本文中的State.Initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。