Ejemplo n.º 1
0
 void Start()
 {
     if (gameController == null)
     {
         gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>();
     }
     health = PlayerPrefs.GetInt("playerHealth");
     healthBar.SetHealthColor(HEALTH_BAR_COLOR);
     UpdateHealthBar();
 }
Ejemplo n.º 2
0
    void Start()
    {
        if (target == null)
        {
            target = GameObject.FindWithTag("Player").transform;
        }
        if (gameController == null)
        {
            gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>();
        }
        if (PlayerPrefs.GetInt("isHardMode") == 1)
        {
            HardModeStats();
        }

        verticalMovement   = 0;
        horizontalMovement = 1;
        healthBar.SetHealthColor(HEALTH_BAR_COLOR);
        UpdateHealthBar();
        InvokeRepeating("ShootShot", .5f, fireRate);
        InvokeRepeating("ShootMissile", .8f, missileRate);
    }