Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        //HideDamageIndicator();

        VFX_Drill(false);
        VFX_Thrust(false);
        VFX_Healing(false);

        shipEntity = GetComponent <ShipEntity>();
        skillTree  = GetComponent <SkillTree>();

        baseSystem        = FindObjectOfType <BaseSystem>();
        inGameMenuManager = FindObjectOfType <InGameMenuManager>();

        playerCollision = GetComponent <BoxCollider>();
        playerRigidbody = GetComponent <Rigidbody>();
        playerTransform = GetComponent <Transform>();

        basePosition = FindObjectOfType <BaseSystem>().transform.position;

        //slowDrillToggle.isOn = (drillSpeed == DrillSpeed.slow) ? true : false;

        //drillerVibrationFrequencyParticleSystem.Stop();

        eachWeightAffectThrustRate = (thrustPower - minimalThrustPower) / shipEntity.MaximalWeight;
        ControlThrustPowerByWeightRate(); // The thrust power will follow current weight rate

        //heatAmount = GetComponent<HeatSystem>().getHeatAmount();
        //maxHeatAmount = GetComponent<HeatSystem>().getMaxHeatAmount();

        originalDragRate = playerRigidbody.drag;
    }
    void Start()
    {
        inGameMenu    = GameObject.Find("Canvas").GetComponent <InGameMenuManager>();
        scoreValue    = GameObject.Find("ScoreValueText").GetComponent <Text>();
        multiplerText = GameObject.Find("Multipler").GetComponent <Text>();

        scoreValue.text = currentScore.ToString();
    }
Example #3
0
    private void Awake()
    {
        controls        = new RoseInputSettings();
        gamepadControls = new RoseInputSettings1();
        myPlayerInput   = GetComponent <PlayerInput>();

        WeaponsManager = GetComponent <IS_PlayerWeaponsManager>();
        MenuManager    = FindObjectOfType <InGameMenuManager>();
    }
Example #4
0
    void Awake()
    {
        Cursor.visible     = false;
        gamePaused         = false;
        canBePaused        = true;
        levelFinished      = false;
        inGameMenuManager  = GameObject.FindGameObjectWithTag("InGameMenuManager").GetComponent <InGameMenuManager>();
        enemiesLeft        = GameObject.FindGameObjectsWithTag("Enemy").Length;
        enemyLeftText.text = "Enemies Left: " + enemiesLeft.ToString();
        Time.timeScale     = 1; // This ensures the game runs with no bugs

        // If the controls are inverted, then set isInverted to -1 to reverse the axis
        if (PlayerPrefs.GetFloat("IsInverted", 0) == 1)
        {
            isInverted = -1;
        }
        else
        {
            isInverted = 1;
        }
    }
Example #5
0
 void Awake()
 {
     instance = this;
 }
Example #6
0
 void ActualPause()
 {
     isPaused                  = true;
     Time.timeScale            = 0;
     inGameMenuManagerInstance = Instantiate(inGameMenuManagerPrefab);
 }
 public GameStatePaused(ContentManager content)
 {
     _contentManager = content;
     _manager        = new InGameMenuManager(OnContinueAction, OnExitAction);
 }