예제 #1
0
    /// <summary>
    /// 角色移动应答
    /// </summary>
    /// <param name="data"></param>
    private void OnCharacterMove(SocketModel model)
    {
        NotifyCharacterMove notify = SerializeUtil.Deserialize <NotifyCharacterMove>(model.message);

        Character role = Battle.instance.GetRole(notify.characterid);

        role.Move(ProtoHelper.PV2UV(notify.position));
    }
예제 #2
0
    /// <summary>
    /// 角色攻击应答
    /// </summary>
    /// <param name="data"></param>
    private void OnCharacterAttack(SocketModel model)
    {
        NotifyCharacterAttack notify = SerializeUtil.Deserialize <NotifyCharacterAttack>(model.message);

        Character role = Battle.instance.GetRole(notify.characterid);

        role.position = ProtoHelper.PV2UV(notify.pos);
        if (notify.pos == null)
        {
            LogManager.Log("OnRoleAttack, position = null");
            return;
        }

        //role.Attack((int)notify.skillid, notify.targetid);
    }