// Start is called before the first frame update void Start() { freezerEffectActivated = new FreezerEffectActivated(); freezerEffectDuration = ConfigurationUtils.FreezerDurationSeconds; speedUpEffectActivated = new SpeedUpEffectActivated(); speedUpDuration = 6; speedUpForse = 20; bonusCoins = ConfigurationUtils.PointsForPickupBlock; SpriteRenderer spriteRenderer = gameObject.GetComponent <SpriteRenderer>(); switch (pickupEffect) { case PickupEffect.Freezer: spriteRenderer.sprite = freezBlock; EventsManager.AddInvoker(this); break; case PickupEffect.Speedup: spriteRenderer.sprite = speedUpBlock; EventsManager.AddInvokerTwo(this); break; } }