Exemple #1
0
    /// <summary>
    /// 请求终止跃迁
    /// </summary>
    public void RequestStopLeap(ulong currentAreaID, ulong targetAreaID)
    {
        GameplayProxy    gameplayProxy    = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
        SpacecraftEntity spacecraftEntity = gameplayProxy.GetMainPlayer();

        Assert.IsTrue(spacecraftEntity != null, "gameplayProxy.GetMainPlayer() is null !!!");
        Rigidbody rigidbody = spacecraftEntity.GetRigidbody();

        Assert.IsTrue(rigidbody != null, "rigidbody is null !!!");

        HeroMoveHandler.SyncLeapCancel(
            spacecraftEntity.GetCurrentState().GetOnlyServerState(),
            (uint)currentAreaID,
            gameplayProxy.ClientToServerAreaOffset(rigidbody.position),
            rigidbody.rotation,
            rigidbody.velocity,
            rigidbody.angularVelocity);
    }