public static IEnumerator OshiroSpawnRoutine(Celeste.Player player, int count)
        {
            while (count > 0)
            {
                yield return(0.5f);

                Celeste.AngryOshiro oshiro = new Celeste.AngryOshiro(new Vector2(player.SceneAs <Celeste.Level>().Bounds.Left - 64, player.Position.Y), false);
                player.Scene.Add(oshiro);
                Session.SpawnedOshiros.Add(oshiro);
                count--;
            }
        }
Ejemplo n.º 2
0
 private static Celeste.PlayerDeadBody OnDeath(On.Celeste.Player.orig_Die orig, Celeste.Player self, Vector2 direction, bool evenIfInvincible, bool registerDeathInStats)
 {
     Celeste.PlayerDeadBody result = orig(self, direction, evenIfInvincible, registerDeathInStats);
     if (result != null)
     {
         string level = self.SceneAs <Celeste.Level>().Session.Level;
         if (TrollLandModule.Session.DeathCountPerLevel.ContainsKey(level))
         {
             TrollLandModule.Session.DeathCountPerLevel[level] += 1;
         }
         else
         {
             TrollLandModule.Session.DeathCountPerLevel[level] = 1;
         }
     }
     return(result);
 }