Ejemplo n.º 1
0
    public void AddBezierEffect(BezierEffectInfo effectInfo)
    {
        BezierEffectView effectView = new BezierEffectView(effectInfo);

        effectView.LoadModel();
        effectView.SetDirtySign(false);
        effectTempList.Add(effectInfo.Id, effectView);
    }
Ejemplo n.º 2
0
    public BezierEffectView(BezierEffectInfo _effectInfo)
    {
        Id = _effectInfo.Id;
        bezierEffectInfo = _effectInfo;
        curPathNum       = 0;
        angle            = Vector3.zero;
        Vector3 startPos = _effectInfo.startPos;
        Vector3 endPos   = _effectInfo.endPos;
        int     fps      = (int)(60 * BattleUtils.Distance2(startPos, endPos) / _effectInfo.speed);

        bezierPath = new Bezier();
        bezierPath.AddPath(startPos, endPos, fps);
    }
Ejemplo n.º 3
0
 //添加动态特效
 public EffectInfo AddMoveEffect(int effectId, CharacterInfo charInfo, CharacterInfo targetInfo, float speed, int pathType, int triggerGroupId = 0)
 {
     effectIndexId += 1;
     if (pathType == 2)
     {
         BezierEffectInfo effectInfo = new BezierEffectInfo(effectIndexId, effectId, charInfo, targetInfo, speed, triggerGroupId);
         EntityViewManager.getInstance().AddBezierEffect(effectInfo);
         effectInfo.SetDirtySign(false);
         effectTempList.Add(effectIndexId, effectInfo);
         return(effectInfo);
     }
     else
     {
         StraightEffectInfo effectInfo = new StraightEffectInfo(effectIndexId, effectId, charInfo, targetInfo, speed, triggerGroupId);
         EntityViewManager.getInstance().AddStraightEffect(effectInfo);
         effectInfo.SetDirtySign(false);
         effectTempList.Add(effectIndexId, effectInfo);
         return(effectInfo);
     }
 }