private void Init() { this.Alpha = 0f; effectRecycler = new ManagedRecycler <JudgementEffect>(CreateEffect); effectHolder = CreateChild("effect-holder", 0); { effectHolder.Size = Vector2.zero; effectRecycler.Precook(6); } hitBarSprite = CreateChild <UguiSprite>("bar", 1); { hitBarSprite.Anchor = AnchorType.MiddleStretch; hitBarSprite.SetOffsetHorizontal(0f); hitBarSprite.SpriteName = "glow-bar"; hitBarSprite.Y = 0f; hitBarSprite.ImageType = Image.Type.Sliced; hitBarSprite.Alpha = 0.5f; } holdAni = new Anime(); holdAni.AnimateFloat(a => hitBarSprite.Alpha = a) .AddTime(0f, () => hitBarSprite.Alpha) .AddTime(0.1f, 1f) .Build(); releaseAni = new Anime(); releaseAni.AnimateFloat(a => hitBarSprite.Alpha = a) .AddTime(0f, () => hitBarSprite.Alpha) .AddTime(0.1f, 0.5f) .Build(); }