Beispiel #1
0
 public void Initialize(LabelRequestContext ctx)
 {
     text.sortingOrder = ++rendererPriority;
     velocity0         = ctx.speed * M.CosSinDeg(ctx.angle);
     tr.localPosition  = loc = ctx.root + ctx.radius * M.CosSinDeg(ctx.angle);
     this.ttl          = ctx.timeToLive;
     time      = 0;
     gradient  = ctx.color;
     text.text = ctx.text;
     SetColor();
 }
Beispiel #2
0
        public void DropDropLabel(IGradient color, string text, float speed = 0.4f, float ttl = 0.7f)
        {
            var req = new LabelRequestContext(Loc, LABEL_RAD, speed, RNG.GetFloatOffFrame(40, 140), ttl, color, text);

            ItemPooler.RequestLabel(req);
        }