Advertisement
XY01

Pickups

Nov 21st, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. // Pickup types
  6. // - Speed increase
  7. // - Teleport
  8. // - Invert controls
  9. // - Add points
  10.  
  11. public class Pickups : MonoBehaviour
  12. {
  13. public enum PickupType
  14. {
  15. AddPoints,
  16. Teleport,
  17. SpeedScaler,
  18. InvertControls,
  19. }
  20.  
  21. public ParticleSystem _PS;
  22.  
  23. public PickupType _Type = PickupType.AddPoints;
  24. public float _Strength;
  25.  
  26. public void Pickup()
  27. {
  28. Instantiate(_PS, transform.position, Quaternion.identity);
  29. Destroy(gameObject);
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement