This commit is contained in:
aozhiwei 2023-11-25 13:10:16 +08:00
parent 2177988ca8
commit 58f34e83b5
7 changed files with 49 additions and 11 deletions

View File

@ -0,0 +1,13 @@
#include "precompile.h"
#include <f8/btmgr.h>
#include "android_agent.h"
AndroidAgent::AndroidAgent()
{
}
AndroidAgent::~AndroidAgent()
{
}

View File

@ -0,0 +1,26 @@
#pragma once
#include "base_agent.h"
namespace a8
{
template<typename T>
static auto SpToWp(std::shared_ptr<T> sp)
{
return std::weak_ptr<T>(sp);
}
}
class AndroidAgent
{
public:
AndroidAgent();
//virtual ~AndroidAgent() override;
~AndroidAgent();
//BEHAVIAC_DECLARE_AGENTTYPE(AndroidAgent, BaseAgent)
public:
};

View File

@ -1,3 +1,4 @@
#if 0
#include "precompile.h"
#include "base_agent.h"
@ -197,3 +198,4 @@ void BaseAgent::AbortCoroutine(int co_id)
}
}
}
#endif

View File

@ -1,5 +1,5 @@
#include "precompile.h"
#if 0
#include "btcoroutine.h"
#include "base_agent.h"
#include "btcontext.h"
@ -22,3 +22,4 @@ void BtCoroutine::Abort(long long frameno)
is_abort_ = true;
abort_frameno = frameno;
}
#endif

View File

@ -1,5 +1,5 @@
#include "precompile.h"
#if 0
#include "btevent.h"
#include "creature.h"
#include "trigger.h"
@ -40,3 +40,4 @@ void BtEvent::FireEvent(BaseAgent* agent)
break;
}
}
#endif

View File

@ -15,14 +15,12 @@ void Player::Update()
}
void Player::Init(int idx,
const std::string& account_id,
const std::string& session_id,
std::shared_ptr<a8::WebSocketClient> socket)
void Player::Init(int idx, const std::string& account_id)
{
std::shared_ptr<a8::WebSocketClient> socket;
socket_handle_ = idx;
account_id_ = account_id;
session_id_ = session_id;
//session_id_ = session_id;
web_socket_ = socket;
web_socket_->on_error =
[this] (a8::WebSocketClient*,int err_code)

View File

@ -17,10 +17,7 @@ public:
void Update();
void Init(int idx,
const std::string& account_id,
const std::string& session_id,
std::shared_ptr<a8::WebSocketClient> socket);
void Init(int idx, const std::string& account_id);
template <typename T>
void SendMsg(T& msg)
{