示例#1
0
    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;
        }
    }
示例#2
0
    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;
    }
示例#3
0
    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
    }