Beispiel #1
0
    public Text displayIsCharging;      //Display if you are currently charging a moon

    void Awake()
    {
        //Associate objects of scripts with the proper real script
        //      playerScript = GameObject.Find("Player").GetComponent<playerController>();
        attractorScript = GameObject.Find("Player").GetComponent <Attractor>();
        mg     = GameObject.Find("Player").GetComponent <moonGenerator>();
        player = GameObject.Find("Player");

        //Get velocity variable from the players rigidbody
        playerVelocity = player.GetComponent <Rigidbody>().velocity;
    }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     moonGenerator = player.GetComponent <moonGenerator>();
     reloadText    = GetComponent <TextMeshProUGUI>();
 }