public static void PlotPlay(List <CameraInfo> clipsID)
    {
        if (isPlaying == false)
        {
            plotClips   = clipsID;
            plotClipNum = 0;
            CutsceneClip first = Cutscene.PlayClip(plotClips[plotClipNum].cameraId);
            TalkId_cut[plotClips[plotClipNum].talkId] = first;                  //  TalkId_cut.Add(plotClips[plotClipNum].talkId, first);
            first.onArriveAtEnding.AddListener(PlotNextPlay);
            isPlaying = true;

            if (Pathea.PeCreature.Instance.mainPlayer != null)
            {
                Pathea.PeCreature.Instance.mainPlayer.motionMgr.DoAction(Pathea.PEActionType.Cutscene);
                //Pathea.PeEntityExt.PeEntityExt.SetInvincible(Pathea.PeCreature.Instance.mainPlayer, true);
                Pathea.PESkEntity skentity = Pathea.PeCreature.Instance.mainPlayer.peSkEntity;
                skentity.SetAttribute(Pathea.AttribType.CampID, 28);
                skentity.SetAttribute(Pathea.AttribType.DamageID, 28);
            }
        }
        else
        {
            plotClips.AddRange(clipsID);
        }
    }
示例#2
0
 public void CheckAttrib(PESkEntity entity, AttribType type, float value)
 {
     if (type == m_Current)
     {
         if (value < 0 || value > entity.GetAttribute(m_Max))
         {
             entity.SetAttribute(m_Current, Mathf.Clamp(value, 0, entity.GetAttribute(m_Max)));
         }
     }
     else if (type == m_Max)
     {
         float currentValue = entity.GetAttribute(m_Current);
         if (currentValue > value)
         {
             entity.SetAttribute(m_Current, value);
         }
     }
 }
 private static void PlotNextPlay()
 {
     plotClipNum++;
     if (plotClipNum < plotClips.Count)
     {
         CutsceneClip notFirst = Cutscene.PlayClip(plotClips[plotClipNum].cameraId);
         TalkId_cut[plotClips[plotClipNum].talkId] = notFirst;               //TalkId_cut.Add(plotClips[plotClipNum].talkId, notFirst);
         notFirst.onArriveAtEnding.AddListener(PlotNextPlay);
     }
     else
     {
         if (Pathea.PeCreature.Instance.mainPlayer != null)
         {
             Pathea.PeCreature.Instance.mainPlayer.motionMgr.EndAction(Pathea.PEActionType.Cutscene);
             //Pathea.PeEntityExt.PeEntityExt.SetInvincible(Pathea.PeCreature.Instance.mainPlayer, false);
             Pathea.PESkEntity skentity = Pathea.PeCreature.Instance.mainPlayer.peSkEntity;
             skentity.SetAttribute(Pathea.AttribType.CampID, 1);
             skentity.SetAttribute(Pathea.AttribType.DamageID, 1);
         }
         plotClipNum = 0;
         TalkId_cut.Clear();
         isPlaying = false;
     }
 }