Пример #1
0
        private static void FlyFeatherOnPlayer(On.Celeste.FlyFeather.orig_OnPlayer orig, FlyFeather self,
                                               Player player)
        {
            Color starFlyColor;

            if (self.GetType() == typeof(ColorfulFlyFeather))
            {
                ColorfulFlyFeather colorfulFlyFeather = (ColorfulFlyFeather)self;
                starFlyColor = colorfulFlyFeather.starFlyColor;

                P_Collect.Color  = colorfulFlyFeather.FlyPowerHairColor.Value;
                P_Collect.Color2 = colorfulFlyFeather.FlyPowerHairColor2.Value;
                P_Boost.Color    = colorfulFlyFeather.FlyPowerHairColor.Value;
                P_Boost.Color2   = colorfulFlyFeather.FlyPowerHairColor2.Value;
                P_Flying.Color   = colorfulFlyFeather.FlyPowerHairColor.Value;
                P_Flying.Color2  = colorfulFlyFeather.FlyPowerHairColor2.Value;
            }
            else
            {
                starFlyColor = OrigStarFlyColor;

                P_Collect.Color  = OrigFlyPowerHairColor;
                P_Collect.Color2 = OrigFlyPowerHairColor2;
                P_Boost.Color    = OrigFlyPowerHairColor;
                P_Boost.Color2   = OrigFlyPowerHairColor2;
                P_Flying.Color   = OrigFlyPowerHairColor;
                P_Flying.Color2  = OrigFlyPowerHairColor2;
            }

            StarFlyColorFieldInfo?.SetValue(player, starFlyColor);

            orig(self, player);
        }
Пример #2
0
        private static void FlyFeatherOnRespawn(On.Celeste.FlyFeather.orig_Respawn orig, FlyFeather self)
        {
            if (self.GetType() == typeof(ColorfulFlyFeather))
            {
                ColorfulFlyFeather colorfulFlyFeather = (ColorfulFlyFeather)self;

                P_Respawn.Color  = colorfulFlyFeather.RespawnColor.Value;
                P_Respawn.Color2 = colorfulFlyFeather.RespawnColor2.Value;
            }
            else
            {
                P_Respawn.Color  = OrigRespawnColor;
                P_Respawn.Color2 = OrigRespawnColor2;
            }

            orig(self);
        }