Beispiel #1
0
    private void Start()
    {
        playerShipMovement   = GetComponent <Scr_PlayerShipMovement>();
        playerShipEffects    = GetComponent <Scr_PlayerShipEffects>();
        playerShipPrediction = GetComponent <Scr_PlayerShipPrediction>();
        rb = GetComponent <Rigidbody2D>();

        fuelSlider.maxValue     = maxFuel;
        fuelTankSlider.maxValue = maxFuel;
        shieldSlider.maxValue   = maxShield;

        level = 0;
    }
Beispiel #2
0
    private void Start()
    {
        rb = GetComponent <Rigidbody2D>();
        playerShipStats      = GetComponent <Scr_PlayerShipStats>();
        playerShipEffects    = GetComponent <Scr_PlayerShipEffects>();
        playerShipActions    = GetComponent <Scr_PlayerShipActions>();
        playerShipPrediction = GetComponent <Scr_PlayerShipPrediction>();
        playerShipDeathCheck = GetComponentInChildren <Scr_PlayerShipDeathCheck>();

        canControlTimerSaved = canControlTimer;
        maxSpeedSaved        = maxSpeed;
        limitSlider.maxValue = maxSpeedSaved;
        speedSlider.maxValue = maxSpeedSaved;
        messageText.text     = "";
        canControlShip       = false;
        onGround             = true;
        checkingDistance     = 100f;
        initialBulletTime    = bulletTime;
        savedTimeToTakeOff   = timeToTakeOff;
        initialZ             = transform.position.z;
    }
Beispiel #3
0
    private void Start()
    {
        playerShipMovement   = GetComponent <Scr_PlayerShipMovement>();
        playerShipPrediction = GetComponent <Scr_PlayerShipPrediction>();
        cableVisuals         = GetComponentInChildren <Scr_CableVisuals>();
        playerShipProxCheck  = GetComponentInChildren <Scr_PlayerShipProxCheck>();
        playerShipRb         = GetComponent <Rigidbody2D>();
        astronautRb          = astronaut.GetComponent <Rigidbody2D>();

        unlockedMiningLaser = false;
        unlockedSpaceWalk   = false;
        canInputAgain       = true;

        deployDelaySaved      = deployDelay;
        miningSlider.maxValue = maxPower;

        Scr_PlayerData.checkpointPlanet             = gameManager.initialPlanet.transform;
        Scr_PlayerData.checkpointPlayershipPosition = transform.localPosition;
        Scr_PlayerData.checkpointPlayershipRotation = transform.localRotation;
        Scr_PlayerData.checkpointFuel   = GetComponent <Scr_PlayerShipStats>().currentFuel;
        Scr_PlayerData.checkpointShield = GetComponent <Scr_PlayerShipStats>().currentShield;
    }