示例#1
0
 void OnStart()
 {
     levelManagerScript = FindObjectOfType <LevelManager>();
     tvPlayer           = FindObjectOfType <PlayerController>();
     playerGunScript    = FindObjectOfType <PlayerGun>();
     playerRouterScript = FindObjectOfType <PlayerRouter>();
     plasmaPlayer       = FindObjectOfType <PlasmaPlayer>();
 }
示例#2
0
文件: LevelEnd.cs 项目: CBDevv/Ewars
 // Use this for initialization
 void Start()
 {
     tvPlayer              = FindObjectOfType <PlayerController>();
     plasmaPlayer          = FindObjectOfType <PlasmaPlayer>();
     theLevelManagerScript = FindObjectOfType <LevelManager>();
     playerGunScript       = FindObjectOfType <PlayerGun>();
     playerRouterScript    = FindObjectOfType <PlayerRouter>();
     bossScript            = FindObjectOfType <Boss>();
     levelCompleteImage.SetActive(false);
 }
示例#3
0
 // Start is called before the first frame update
 void Start()
 {
     shopScreenUI.SetActive(false);
     Dialog.SetActive(false);
     ShieldsMessage.SetActive(false);
     VPNMessage.SetActive(false);
     vpnHUDImage.SetActive(false);
     tvPlayer           = FindObjectOfType <PlayerController>();
     playerGunScript    = FindObjectOfType <PlayerGun>();
     levelManagerScript = FindObjectOfType <LevelManager>();
     playerRouterScript = FindObjectOfType <PlayerRouter>();
 }
示例#4
0
    // Use this for initialization
    void Start()
    {
        //currentLives = startingLives;

        vpnHUDImage.SetActive(false);
        tvPlayer            = FindObjectOfType <PlayerController>();
        evolveScript        = FindObjectOfType <Evolve>();
        batteryHealthScript = FindObjectOfType <BatteryHealth>();
        boss1              = FindObjectOfType <Boss>();
        playerGunScript    = FindObjectOfType <PlayerGun>();
        playerRouterScript = FindObjectOfType <PlayerRouter>();
        levelEndScript     = FindObjectOfType <LevelEnd>();
        gunPickupScript    = FindObjectOfType <GunPickup>();
        routerPickupScript = FindObjectOfType <RouterPickup>();

        //***********************LOADING SAVE DATA********************************************

        if (PlayerPrefs.HasKey("ShieldChargeCount"))
        {
            playerRouterScript.shieldChargeCount = PlayerPrefs.GetInt("ShieldChargeCount");
        }
        playerRouterScript.shieldChargeText.text = playerRouterScript.shieldChargeCount.ToString();


        if (PlayerPrefs.HasKey("HasRouter"))
        {
            tvPlayer.hasRouter = PlayerPrefs.GetInt("HasRouter");
        }

        if (PlayerPrefs.HasKey("HasVPN"))
        {
            tvPlayer.hasVPN = PlayerPrefs.GetInt("HasVPN");
        }

        if (PlayerPrefs.HasKey("HasGun"))
        {
            tvPlayer.hasGun = PlayerPrefs.GetInt("HasGun");
        }

        //Checks for if you have phaser bullets. If there you do, it will load those back.
        //CODE GOES HERE
        //
        if (PlayerPrefs.HasKey("PhaserBulletCount"))
        {
            playerGunScript.phaserBulletCount = PlayerPrefs.GetInt("PhaserBulletCount");
        }

        playerGunScript.phaserBulletText.text = playerGunScript.phaserBulletCount.ToString();

        //Checks for if you have memory cards, and if there is value, load it back.
        if (PlayerPrefs.HasKey("MemCount"))
        {
            memCount = PlayerPrefs.GetInt("MemCount");
        }
        memText.text = memCount.ToString();

        //Checks for if you have upgrades, and if there is a value, load it back.
        if (PlayerPrefs.HasKey("UpgradeCount"))
        {
            upgradeCount = PlayerPrefs.GetInt("UpgradeCount");
        }
        upgradeText.text = upgradeCount.ToString();

        //Checks for if you have lives, and if there is value, load it back.
        if (PlayerPrefs.HasKey("PlayerLives"))
        {
            currentLives = PlayerPrefs.GetInt("PlayerLives");
        }

        else
        {
            currentLives = startingLives;
        }

        //currentLives = startingLives;
        livesText.text = "x " + currentLives;
        objectsToReset = FindObjectsOfType <ResetOnRespawn>();
    }
示例#5
0
 // Start is called before the first frame update
 void Start()
 {
     tvPlayerScript     = FindObjectOfType <PlayerController>();
     playerRouterScript = FindObjectOfType <PlayerRouter>();
 }