Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class variables : MonoBehaviour {
- public static variables instance;
- public int health;
- public int bullets;
- void Awake(){
- instance = this;
- }
- }
- using UnityEngine;
- using System.Collections;
- public class access : MonoBehaviour {
- public int healthAccess;
- public int bulletsAccess;
- void Update () {
- bulletsAccess = variables.instance.bullets;
- healthAccess = variables.instance.health;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement