示例#1
0
 public void Update(LevelTime levelTime)
 {
     while (idx < list.Count &&
            levelTime.SongPosition >= TimeSelector.Invoke(list[idx]))
     {
         var time   = TimeSelector.Invoke(list[idx]);
         var lateBy = levelTime.SongPosition - time;
         var args   = new TimeIterActionArgs <T>()
         {
             List      = list,
             Index     = idx,
             LevelTime = levelTime,
             LateBy    = lateBy,
         };
         Action.Invoke(args);
         idx++;
     }
 }
示例#2
0
        private void OnFireShot(TimeIterActionArgs <Shot> args)
        {
            var newBullets = shotCreator.FireShot(args.List[args.Index], spawners, playerCenter);

            Bullets.AddRange(newBullets);
        }