示例#1
0
    /// <summary>
    /// 9屏同步钓鱼状态
    /// </summary>
    /// <param name="cmd"></param>
    public void OnFishingStateToNine(stFishStateToNinePropertyUserCmd_S cmd)
    {
        IEntitySystem es = ClientGlobal.Instance().GetEntitySystem();

        if (es == null)
        {
            return;
        }

        IPlayer player = es.FindPlayer(cmd.uid);

        if (player == null)
        {
            return;
        }

        // 1 :进入钓鱼  2 :退出钓鱼
        if (cmd.type == 1)
        {
            //调整人物朝向
            AdjustPlayerFoward(player);

            //武器换成鱼竿
            DataManager.Manager <SuitDataManager>().OnFishingRodSuit(player);
        }
        else if (cmd.type == 2)
        {
            //鱼竿换回武器
            DataManager.Manager <SuitDataManager>().RebackWeaponSuitAndCleanData(player.GetID());

            //播放站立动作
            PlayAnimation(cmd.uid, EntityAction.Stand, -1);

            //关闭画鱼线
            CloseFishingLine(cmd.uid);
        }
    }
示例#2
0
 public void OnFishingStateToNine(stFishStateToNinePropertyUserCmd_S msg)
 {
     DataManager.Manager <FishingManager>().OnFishingStateToNine(msg);
 }