Example #1
0
 // Use this for initialization
 void Start()
 {
     GetComponent<Rigidbody>().velocity = transform.forward * speed;
     gameState = GameObject.Find ("GameController").GetComponentInChildren<GameState> ();
     upgradeGUI = GameObject.Find("GUIController").GetComponentInChildren<UpgradeGUI>();
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     playerState = GetComponent<PlayerState>();
     weaponSystem = GetComponent<WeaponSystem> ();
     gameState = GameObject.Find("GameController").GetComponent<GameState>();
     upgradeGUI = GameObject.Find("GUIController").GetComponentInChildren<UpgradeGUI>();
 }
Example #3
0
 void Start()
 {
     gameState = GameObject.Find ("GameController").GetComponentInChildren<GameState> ();
     upgradeGUI = GameObject.Find("GUIController").GetComponentInChildren<UpgradeGUI>();
 }
Example #4
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find ("Player");
        gameState = GameObject.Find ("GameController").GetComponentInChildren<GameState> ();
        flamer = GameObject.Find ("FlamerEmission");
        fe = GameObject.Find ("FeEmission");
        upgradeGUI = GameObject.Find("GUIController").GetComponentInChildren<UpgradeGUI>();

        //initialize base stats
        meleeAttackSpeed_base = 1.0f;
        gunAmmo_base = 10;
        fireRate_base = 0.5f;
        pulseAmmo_base = 3;
        flameAmmo_base = 2.0f;
        feAmmo_base = 5.0f;
        pulse_radius_base = 50;
        flamerange_base = 5.0f;
        ferange_base = 5.0f;

        //initialize stat levels
        meleeAttackSpeed_level = 1;
        gunAmmo_level = 1;
        fireRate_level = 1;
        pulseAmmo_level = 1;
        flameAmmo_level = 1;
        feAmmo_level = 1;
        pulse_radius_level = 1;
        flamerange_level = 1;
        ferange_level = 1;

        //set base as max
        meleeAttackSpeed_max = meleeAttackSpeed_base;
        gunAmmo_max = gunAmmo_base;
        fireRate_max = fireRate_base;
        pulseAmmo_max = pulseAmmo_base;
        flameAmmo_max = flameAmmo_base;
        feAmmo_max = feAmmo_base;
        pulse_radius_max = pulse_radius_base;
        flamerange_max = flamerange_base;
        ferange_max = ferange_base;

        //set max to actual
        meleeAttackSpeed = meleeAttackSpeed_max;
        gunAmmo = gunAmmo_max;
        fireRate = fireRate_max;
        pulseAmmo = pulseAmmo_max;
        flameAmmo = flameAmmo_max;
        feAmmo = feAmmo_max;
        pulse_radius = pulse_radius_max;
        flamerange = flamerange_max;
        ferange = ferange_max;

        activeWeaponList [0] = true;
        melee.GetComponent<Collider>().enabled = false;
    }