예제 #1
0
 private void Start()
 {
     player                  = GameObject.FindGameObjectWithTag("Player");
     mouvmentInstance        = this;
     speed                   = minSpeed;
     Camera.main.fieldOfView = minFieldOfView;
     playerStamina           = GameObject.FindGameObjectWithTag("Player").GetComponent <stamina>();
 }
    // Use this for initialization
    void Start()
    {
        //initializing status variables
        playerHealth  = new health(healthAmt);
        playerStamina = new stamina(staminaAmt);
        firesNearby   = 0;
        timeTrack     = 0;

        //initializing movement variables
        moveLeft      = false;
        moveRight     = false;
        moveUp        = false;
        moveDown      = false;
        speed         = 0.1f;
        cam           = Camera.main;
        anim          = GetComponent <Animator>();
        sprite_render = GetComponent <SpriteRenderer>();
    }
예제 #3
0
 private void Start()
 {
     playerStamina = GameObject.FindGameObjectWithTag("Player").GetComponent <stamina>();
     staminaSlider = GetComponent <Slider>();
 }