コード例 #1
0
 private static void Fly_BitByPlayer(On.Fly.orig_BitByPlayer orig, Fly self, Creature.Grasp grasp, bool eu)
 {
     orig.Invoke(self, grasp, eu);
     for (int i = 0; i < 2; i++)
     {
         self.room.AddObject(new BloodParticle(self.mainBodyChunk.pos, new Vector2(UnityEngine.Random.Range(-3f, 3f), UnityEngine.Random.Range(1f, 5f)), BloodMod.creatureColors["Fly"], "Fly", null, 1.3f));
     }
 }
コード例 #2
0
 public override void Grabbed(Creature.Grasp grasp)
 {
     orig_Grabbed(grasp);
     if (grasp.grabber is Lizard || grasp.grabber is Vulture || grasp.grabber is BigSpider || grasp.grabber is DropBug || grasp.grabber is SeaDrake)
     {
         this.dangerGraspTime = 0;
         this.dangerGrasp     = grasp;
     }
 }
コード例 #3
0
    //PULL-OUT PRICE

    private static void Weapon_Grabbed(On.Weapon.orig_Grabbed orig, Weapon self, Creature.Grasp grasp)
    {
        if (self.mode == Weapon.Mode.StuckInWall && grasp.grabber is Player)
        {
            if (((Player)grasp.grabber).Karma < KarmaAppetite.STARTING_MAX_KARMA)
            {
                KarmaAppetite.RemoveQuarterFood((Player)grasp.grabber);
            }
        }
        orig.Invoke(self, grasp);
    }
コード例 #4
0
 // Token: 0x060018DE RID: 6366 RVA: 0x0013F158 File Offset: 0x0013D358
 public void BitByPlayer(Creature.Grasp grasp, bool eu)
 {
     bites--;
     room.PlaySound((bites != 0) ? SoundID.Slugcat_Bite_Dangle_Fruit : SoundID.Slugcat_Eat_Dangle_Fruit, firstChunk.pos);
     firstChunk.MoveFromOutsideMyUpdate(eu, grasp.grabber.mainBodyChunk.pos);
     if (bites < 1)
     {
         (grasp.grabber as Player).ObjectEaten(this);
         grasp.Release();
         Destroy();
     }
 }
コード例 #5
0
 public extern void orig_Grabbed(Creature.Grasp grasp);
コード例 #6
0
    //NO LIGHT FROM NEURONS

    private static void OracleSwarmer_BitByPlayer(On.OracleSwarmer.orig_BitByPlayer orig, OracleSwarmer self, Creature.Grasp grasp, bool eu)
    {
        orig.Invoke(self, grasp, eu);
        KarmaAppetite.RefreshLight(grasp.grabber as Player);
    }
コード例 #7
0
 private void JellyFishBiteHook(On.JellyFish.orig_BitByPlayer orig, JellyFish self, Creature.Grasp grasp, bool eu)
 {
     if (grasp.grabber is Player && (grasp.grabber as Player).playerState.slugcatCharacter == PlayerManager.GetCustomPlayer("Electric").SlugcatIndex)
     {
         self.bites--;
         self.room.PlaySound((self.bites != 0) ? SoundID.Slugcat_Bite_Jelly_Fish : SoundID.Slugcat_Eat_Jelly_Fish, self.firstChunk.pos);
         self.firstChunk.MoveFromOutsideMyUpdate(eu, grasp.grabber.mainBodyChunk.pos);
         if (!self.AbstrConsumable.isConsumed)
         {
             self.AbstrConsumable.Consume();
         }
         for (int i = 0; i < self.tentacles.Length; i++)
         {
             for (int j = 0; j < self.tentacles[i].GetLength(0); j++)
             {
                 self.tentacles[i][j, 0] = Vector2.Lerp(self.tentacles[i][j, 0], self.firstChunk.pos, 0.2f);
             }
         }
         if (self.bites < 1)
         {
             for (int i = 0; i < EVars.Count; i++)
             {
                 if (EVars[i].ply == (grasp.grabber as Player))
                 {
                     EVars[i].EnterChargedModeNoToll();
                 }
             }
             //(grasp.grabber as Player).ObjectEaten(self);
             grasp.Release();
             self.Destroy();
         }
     }
     else
     {
         orig.Invoke(self, grasp, eu);
     }
 }
コード例 #8
0
 public override void Grabbed(Creature.Grasp grasp)
 {
     base.Grabbed(grasp);
     room.PlaySound(SoundID.Slugcat_Pick_Up_Spear, firstChunk);
 }
コード例 #9
0
 private static void JellyFish_BitByPlayer(On.JellyFish.orig_BitByPlayer orig, JellyFish self, Creature.Grasp grasp, bool eu)
 {
     orig.Invoke(self, grasp, eu);
     for (int i = 0; i < 2; i++)
     {
         self.room.AddObject(new BloodParticle(self.bodyChunks[0].pos, new Vector2(UnityEngine.Random.Range(-3f, 3f), UnityEngine.Random.Range(1f, 5f)), BloodMod.creatureColors["JellyFish"], "JellyFish", null, 1.3f));
     }
 }