void Start()
 {
     justWon = false;
     //smoke.SetActive(false);
     //bigExplosion.SetActive(false);
     levelmanager     = LevelManager.FindObjectOfType <LevelManager>();
     battlecontroller = BattleControllerTurnBased.FindObjectOfType <BattleControllerTurnBased>();
     playercontroller = RTSBattleController.FindObjectOfType <RTSBattleController>();
     takeAwayEnemy    = PlayerPrefs.GetInt("NGC1300NUMBER_OF_ENEMIES") - 1;
     xp = XP.FindObjectOfType <XP>();
 }
 void Start()
 {
     playerShipTarget = PlayerShip.GetComponent <Transform> ();
     playerAccuracy   = PlayerPrefs.GetFloat("GUNNER") + 50f;
     deflectorDamage  = PlayerPrefs.GetFloat("DEFLECTORS");
     justWon          = false;
     //smoke.SetActive(false);
     //bigExplosion.SetActive(false);
     levelmanager     = LevelManager.FindObjectOfType <LevelManager>();
     battlecontroller = BattleControllerTurnBased.FindObjectOfType <BattleControllerTurnBased>();
     playercontroller = RTSBattleController.FindObjectOfType <RTSBattleController>();
     takeAwayEnemy    = PlayerPrefs.GetInt("NGC1300NUMBER_OF_ENEMIES") - 1;
     xp = XP.FindObjectOfType <XP>();
 }
Exemplo n.º 3
0
    void Start()
    {
        singleFight  = SingleFightScriptPlace.FindObjectOfType <SingleFightScriptPlace> ();
        playerhealth = PlayerHealth.FindObjectOfType <PlayerHealth> ();

        playerController = RTSBattleController.FindObjectOfType <RTSBattleController> ();
        battleController = BattleControllerTurnBased.FindObjectOfType <BattleControllerTurnBased> ();

        if (singleFight == null)
        {
            playerController2 = PlayerAttackScriptMultipleEnemies.FindObjectOfType <PlayerAttackScriptMultipleEnemies> ();

            battleController2 = BattleControllerTurnBasedMultipleScript.FindObjectOfType <BattleControllerTurnBasedMultipleScript> ();
        }



        /*repair.SetActive (false);
         * shield.SetActive (true);
         * attackPoints.SetActive (false);
         * weaponBoost.SetActive (false);
         */
        CheckIfAnyActive();
    }
Exemplo n.º 4
0
    void Start()
    {
        //---------------------------------------------------------------------------------DEBUG -----------------------------------------------------------
        //PlayerPrefs.SetInt("GUNNER_LVL", 20);
        //PlayerPrefs.SetInt ("PlasmaLaserOnResistance", 1);

        PlayerPrefs.SetFloat("EVADEBOOSTER_SKILL", 1);



        //===================================================================================================================================================

        evadeOn = false;


        aimingReticle.speed = 1 - (PlayerPrefs.GetInt("GUNNER_LVL") * .02f);
        Debug.Log("player gunner skill is " + PlayerPrefs.GetInt("GUNNER_LVL"));
        Debug.Log(aimingReticle.speed + " is the speed");

        playerAnimator = GetComponent <Animator> ();



        diplomacyPanel.SetActive(false);
        glassCrack.enabled = false;
        frost.FrostAmount  = 0f;
        if (PlayerHealth.playerHealth <= 20)
        {
            Debug.Log("playerhealth is less than twenty...apparently");
            frost.enabled      = true;
            glassCrack.enabled = true;
            frost.FrostAmount  = .26f;

            Debug.Log("frost enabled = " + frost.enabled);
        }

        shieldBarPanel.SetActive(false);

        //diplomacy = DiplomacyScript.FindObjectOfType<DiplomacyScript> ();
        diplomacyUsed        = false;
        shieldOn             = false;
        evade                = PlayerPrefs.GetFloat("EVADE");
        shieldBar.fillAmount = 0;

        //resistance = GameObject.FindWithTag("RESISTANCEBATTLE")as GameObject;
        //silverhawk = GameObject.FindWithTag("SILVERHAWKBATTLE")as GameObject;
        if (Character.isSilverhawk)
        {
            silverhawk.SetActive(true);
            resistance.SetActive(false);
        }
        if (!Character.isSilverhawk)
        {
            silverhawk.SetActive(false);
            resistance.SetActive(true);
        }

        var aSource = GetComponents <AudioSource>();

        shield1        = aSource [0];
        shield2        = aSource [1];
        repair1        = aSource [2];
        repair2        = aSource [3];
        okIllGetToIt   = aSource [4];
        shieldOnAudio  = aSource [5];
        shieldOffAudio = aSource [6];
        evadeAudio     = aSource [7];



        //GameObject enemyParent = GameObject.Find("EnemyList");
        //enemyShip = enemyParent.transform.GetChild(0).gameObject;
        //enemyShipSmallGrayDefault = enemyParent.transform.GetChild(0).gameObject;
        battlecontroller = BattleControllerTurnBased.FindObjectOfType <BattleControllerTurnBased>();
        playerhealth     = PlayerHealth.FindObjectOfType <PlayerHealth>();
        shield.SetActive(false);
        playerhealth.UpdateDisplay();
        levelmanager = LevelManager.FindObjectOfType <LevelManager>();
        Text attackpoints = GetComponent <Text>();

        if (Character.isSilverhawk)
        {
            silverhawk.SetActive(true);
            resistance.SetActive(false);
        }
        if (Character.isSilverhawk == false)
        {
            silverhawk.SetActive(false);
            resistance.SetActive(true);
        }
        AttackPoints.fillAmount = 1f;

        //attackpoints.text= "100";
    }