Example #1
0
    /// <summary>
    /// 是否在跃迁中
    /// </summary>
    /// <returns>bool</returns>
    protected bool IsLeaping()
    {
        SpacecraftEntity entity = GetMainEntity();

        if (entity)
        {
            return(entity.IsLeap());
        }
        return(false);
    }
    /// <summary>
    /// 是否在跃迁中
    /// </summary>
    /// <returns>bool</returns>
    protected bool IsLeaping()
    {
        GameplayProxy    proxy  = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
        SpacecraftEntity entity = proxy.GetEntityById <SpacecraftEntity>(proxy.GetMainPlayerUID());

        if (entity)
        {
            return(entity.IsLeap());
        }
        return(false);
    }
Example #3
0
    /// <summary>
    /// 是否在跃迁中
    /// </summary>
    /// <returns>bool</returns>
    private bool IsLeaping()
    {
        SpacecraftEntity entity = m_GameplayProxy.GetEntityById <SpacecraftEntity>(m_GameplayProxy.GetMainPlayerUID());

        if (entity)
        {
            return(entity.IsLeap());
        }

        return(false);
    }
Example #4
0
 private void OnLeap(HotkeyCallback callback)
 {
     if (callback.performed)
     {
         GameplayProxy    proxy  = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
         SpacecraftEntity entity = proxy.GetEntityById <SpacecraftEntity>(proxy.GetMainPlayerUID());
         if (entity != null)
         {
             if (!entity.IsLeap())
             {
                 (GameFacade.Instance.RetrieveProxy(ProxyName.AutoNavigationProxy) as AutoNavigationProxy)?
                 .GoTo(m_CfgEternityProxy.GetCurrentGamingMapId(), MapManager.GetInstance().GetCurrentAreaUid(), m_Data.gamingmapId, m_CurrentCell.GetData().areaId);
                 UIManager.Instance.ClosePanel(UIPanel.StarAreaPanel);
             }
         }
     }
 }