コード例 #1
0
 private static void DreamBlock_Setup(On.Celeste.DreamBlock.orig_Setup orig, DreamBlock self)
 {
     if (self is DreamBlockDummy dummy && dummy.OnSetup != null)
     {
         dummy.OnSetup();
         return;
     }
     orig(self);
 }
コード例 #2
0
        private static void DreamBlock_Setup(On.Celeste.DreamBlock.orig_Setup orig, DreamBlock self)
        {
            DreamDashController controller = self.Scene.Tracker.GetEntity <DreamDashController>();
            bool playerHasDreamdash        = (bool)dreamBlockPlayerHasDreamDash.GetValue(self);

            orig(self);

            if (playerHasDreamdash)
            {
                controller?.changeDreamBlockParticleColors(self);
            }
        }