Ejemplo n.º 1
0
 private XBullet GenerateBullet(XResultData data, GameObject target, int additionalAngle, int wid = -1)
 {
     return(new XBullet(new XBulletData(
                            host,
                            current,
                            target,
                            data.Index,
                            data.LongAttackData.FireAngle + additionalAngle,
                            wid,
                            host.Hits)));
 }
Ejemplo n.º 2
0
 private void Project(XResultData param, int additionalAngle = 0)
 {
     if (param.Attack_All)
     {
         IHitHoster[] hits = host.Hits;
         for (int i = 0; i < hits.Length; i++)
         {
             XBulletMgr.singleton.ShootBullet(GenerateBullet(param, hits[i].HitObject, additionalAngle));
         }
     }
     else if (param.Warning)
     {
         for (int i = 0; i < host.Attribute.skillWarning.warningPosAt[param.Warning_Idx].Count; i++)
         {
             XBulletMgr.singleton.ShootBullet(GenerateBullet(param, null, additionalAngle, i));
         }
     }
     else
     {
         XBulletMgr.singleton.ShootBullet(GenerateBullet(param, host.Target, additionalAngle));
     }
 }
Ejemplo n.º 3
0
    public override void OnTrigger(object param)
    {
        XResultData data = param as XResultData;

        if (data.Loop)
        {
            int i = data.Index << 16;
            LoopResults(i);
        }
        else if (data.Group)
        {
            int i = data.Index << 16;
            GroupResults(i);
        }
        else if (data.LongAttackEffect)
        {
            Project(data);
        }
        else
        {
            InnerResult(data.Index, host.Transform.forward, host.Transform.position, current);
        }
    }