Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class variables : MonoBehaviour {
  5. public static variables instance;
  6. public int health;
  7. public int bullets;
  8.  
  9.  
  10. void Awake(){
  11. instance = this;
  12. }
  13. }
  14.  
  15. using UnityEngine;
  16. using System.Collections;
  17.  
  18. public class access : MonoBehaviour {
  19. public int healthAccess;
  20. public int bulletsAccess;
  21.  
  22. void Update () {
  23. bulletsAccess = variables.instance.bullets;
  24. healthAccess = variables.instance.health;
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement