Esempio n. 1
0
 public static float GetCurrentBarrierTransparency(SeekerBarrierRenderer renderer)
 {
     if (renderer is CustomSeekerBarrier.Renderer customRenderer)
     {
         return(customRenderer.transparency);
     }
     return(getAndLerp(controller => controller.transparency, 0.15f, MathHelper.Lerp));
 }
Esempio n. 2
0
        // those are called from the IL hooks:

        public static Color GetCurrentBarrierColor(SeekerBarrierRenderer renderer)
        {
            if (renderer is CustomSeekerBarrier.Renderer customRenderer)
            {
                return(customRenderer.color);
            }
            return(getAndLerp(controller => controller.color, Color.White, Color.Lerp));
        }
        public CustomSeekerBarrier(EntityData data, Vector2 offset) : base(data, offset)
        {
            renderer = new Renderer()
            {
                Tag          = Tags.TransitionUpdate, // get rid of the Global tag
                Depth        = 1,                     // vanilla is 0, this makes it dependent on loading order
                color        = Calc.HexToColor(data.Attr("color", "FFFFFF")),
                transparency = data.Float("transparency", 0.15f)
            };

            particleColor        = Calc.HexToColor(data.Attr("particleColor", "FFFFFF"));
            particleTransparency = data.Float("particleTransparency", 0.5f);
            particleDirection    = data.Float("particleDirection", 0f);
        }