public void CollectBy(PersoController collector) { switch (type) { case LumType.Red: collector.Heal(20); break; case LumType.Yellow: GetPerso <World>().lums++; break; case LumType.Blue: collector.SFX("Rayman2/Lums/Yellow").Play(0.1f, 0.3f); collector.Heal(20); break; case LumType.Green: if (collector.checkpoint != null) { collector.checkpoint.lum.Restart(); } collector.checkpoint = creator as CHR_CheckP; break; } SpawnParticle(collector, "LumCollect", type); SetNullPos(); collector.SFX($"Rayman2/Lums/{type}").Play(0.1f); OnCollect(collector); }
public void CollectBy(PersoController collector) { switch (type) { case LumType.Red: collector.Heal(20); break; case LumType.Green: if (collector.checkpoint != null) { collector.checkpoint.lum.Restart(); } collector.checkpoint = (CHR_CheckP)creator; break; } OnCollect(collector); }
public override void OnCollect(PersoController collector) { collector.Heal(20); if (t_poof.active) { return; } float time = GetDsgVar <float>("Float_0"); time = 6.5f; t_poof.Start(time, () => { foreach (var l in all) { l.Remove(); } }, false); }