1
This commit is contained in:
parent
2177988ca8
commit
58f34e83b5
13
server/robotserver/android_agent.cc
Normal file
13
server/robotserver/android_agent.cc
Normal file
@ -0,0 +1,13 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <f8/btmgr.h>
|
||||
|
||||
#include "android_agent.h"
|
||||
|
||||
AndroidAgent::AndroidAgent()
|
||||
{
|
||||
}
|
||||
|
||||
AndroidAgent::~AndroidAgent()
|
||||
{
|
||||
}
|
26
server/robotserver/android_agent.h
Normal file
26
server/robotserver/android_agent.h
Normal 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:
|
||||
|
||||
};
|
@ -1,3 +1,4 @@
|
||||
#if 0
|
||||
#include "precompile.h"
|
||||
|
||||
#include "base_agent.h"
|
||||
@ -197,3 +198,4 @@ void BaseAgent::AbortCoroutine(int co_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user