Exemplo n.º 1
0
    private void OnPointUp(BaseEventData arg0)
    {
        //GameEntity entity = _context.CreateEntity();
        //entity.AddPlayerId(Config.SelfId);
        //entity.AddSteerPosition(Vector2.zero);
        // 发送到帧同步服务器
        SteerPositionReq req = new SteerPositionReq();

        req.X = 0;
        req.Y = 0;
        LockStepClientMgr.GetInstance().SendMsg(MsgID.SteerPositionReq, req);
    }
Exemplo n.º 2
0
    private void OnClick(BaseEventData arg0)
    {
        PointerEventData eventData = (PointerEventData)arg0;
        //GameEntity entity = _context.CreateEntity();
        //entity.AddPlayerId(Config.SelfId);
        //entity.AddSteerPosition(eventData.position);
        // 发送到帧同步服务器
        SteerPositionReq req = new SteerPositionReq();

        req.X = eventData.position.x;
        req.Y = eventData.position.y;
        LockStepClientMgr.GetInstance().SendMsg(MsgID.SteerPositionReq, req);
    }