Exemplo n.º 1
0
 public void OnFrankKilled()
 {
     frankCount -= 1;
     money      += baseBounty;
     baseBounty += bountyIncrease;
     MoneyText.SetNumber((int)money);
 }
Exemplo n.º 2
0
 private void Update()
 {
     MouseDelta   = Input.mousePosition - prevMousePos;
     prevMousePos = Input.mousePosition;
     if (IsPaused && pauseScreen.activeSelf && Input.GetKeyDown(KeyCode.Escape))
     {
         UnpauseGame();
         return;
     }
     if (!IsIdle)
     {
         return;
     }
     if (Input.GetKeyDown(KeyCode.Escape) && (!SelectableObject.selected || SelectableObject.selected == main))
     {
         PauseGame();
         return;
     }
     if (frankCount == 0)
     {
         Win();
         return;
     }
     time  += Time.deltaTime;
     money += moneyGain * Time.deltaTime;
     MoneyText.SetNumber((int)money);
     GameCamera.HandleUpdate();
 }
Exemplo n.º 3
0
 public bool SpendMoney(int moneySpent)
 {
     if (money >= moneySpent)
     {
         SFXManager.Instance.PlaySFX("Money");
         money -= moneySpent;
         MoneyText.SetNumber((int)money);
         return(true);
     }
     return(false);
 }
Exemplo n.º 4
0
    void Awake()
    {
        if (Instance)
        {
            return;
        }
        Instance   = this;
        GameCamera = GetComponentInChildren <GameCamera>();
        MoneyText  = GetComponentInChildren <MoneyText>();
        MoneyText.SetNumber((int)money, true);
        notificationManager = GetComponentInChildren <NotificationManager>();
        weaponManager       = GetComponentInChildren <WeaponManager>();

        // Intro
        GameState = GameState.Cutscene;
        introScreen.gameObject.SetActive(true);
        pauseScreen.SetActive(false);

        // Spawn franks
        SpawnFranks();

        prevMousePos = Input.mousePosition;
    }