예제 #1
0
    void Awake()
    {
        player            = GameObject.FindGameObjectWithTag("Player");
        fossilSystem      = player.GetComponent <FossilSystem>();
        playerScript      = player.GetComponent <PlayerController>();
        ingredientManager = player.GetComponent <IngredientManager>();

        // Disable panel
        HidePanel();
    }
예제 #2
0
 private void Start()
 {
     dead          = false;
     player        = GameObject.FindGameObjectWithTag("Player");
     playerHealth  = player.GetComponent <PlayerController>();
     fossilSystem  = player.GetComponent <FossilSystem>();
     animator      = GetComponent <Animator>();
     currentHealth = startingHealth;
     startingPosX  = transform.position.x;
 }
예제 #3
0
    private void Start()
    {
        dead          = false;
        player        = GameObject.FindGameObjectWithTag("Player");
        playerHealth  = player.GetComponent <PlayerController>();
        fossilSystem  = player.GetComponent <FossilSystem>();
        animator      = GetComponent <Animator>();
        currentHealth = startingHealth;
        startingPosX  = transform.position.x;
        animator.SetBool("Alive", true);

        // Get the AudioSource of the player
        Audio = GetComponent <AudioSource>();
    }