Esempio n. 1
0
    /// <summary>
    /// 9屏同步钓鱼动作
    /// </summary>
    /// <param name="cmd"></param>
    public void OnFishingAniToNine(stFishToNinePropertyUserCmd_S cmd)
    {
        IEntitySystem es = ClientGlobal.Instance().GetEntitySystem();

        if (es == null)
        {
            return;
        }

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

        if (player == null)
        {
            return;
        }

        //不是钓鱼的装备  换成钓鱼的装备
        if (false == DataManager.Manager <SuitDataManager>().IsFishingSuit(cmd.uid))
        {
            //调整人物朝向
            AdjustPlayerFoward(player);

            //武器换成鱼竿
            DataManager.Manager <SuitDataManager>().OnFishingRodSuit(player);
        }


        // 1 :为抛竿  3 :为收杆
        if (cmd.type == 1)
        {
            PlayStartFishingAni(cmd.uid);

            //鱼竿动画
            PlayFishingRodAni(cmd.uid, "Angling_Start");

            //关闭画鱼线
            CloseFishingLine(cmd.uid);

            Engine.CorotinueInstance.Instance.StartCoroutine(DrawFishingLine(cmd.uid));
        }
        else if (cmd.type == 3)
        {
            PlayAnimation(cmd.uid, EntityAction.FishingEnd, 1);

            //鱼竿动画
            PlayFishingRodAni(cmd.uid, "Angling_End");

            //关闭画鱼线
            CloseFishingLine(cmd.uid);

            //收杆动作完成后 回收鱼竿 播放idle
            Engine.CorotinueInstance.Instance.StartCoroutine(DelayToFishngStand(cmd.uid));
        }
    }
Esempio n. 2
0
 public void OnFishingToNine(stFishToNinePropertyUserCmd_S msg)
 {
     DataManager.Manager <FishingManager>().OnFishingAniToNine(msg);
 }