private float timePassed; //The amount of time that passed since the last increase // Use this for initialization void Start() { timePassed = 0f; body = GetComponent <JustinPlayerController> (); if (body == null) { enabled = false; } }
public AudioSource audio; //The shooting sound effect // Use this for initialization void Start() { parent = GameObject.Find("Bullets"); gunTransform = GetComponent <Transform>(); player = GetComponentInParent <JustinPlayerController>(); if (player == null) { player1 = GetComponentInParent <JustinPlayerControllerNN>(); } timePassed = attackSpeed; }
private bool movedUp; //Whether or not the gun is elevated // Use this for initialization void Start() { movedUp = false; rigidBod = GetComponent <Rigidbody2D>(); controller = GetComponent <JustinPlayerController>(); }
private JustinPlayerController player; //The controller responsible for moving the player // Use this for initialization void Start() { player = GetComponentInParent <JustinPlayerController>(); //Retrieves the current controller that is making the player move }