Beispiel #1
0
    void Awake()
    {
        g_instance = this;

        m_isSound     = PlayerPrefs.GetInt("IsSound", 1) != 0;
        m_isFirstTime = PlayerPrefs.GetInt("IsFirstTime", 1) != 0;

        m_currentScore     = new ObsecuredInt(PlayerPrefs.GetString("d64148fac8fb5fc0d1847723e5741e6c"));
        m_highScore        = new ObsecuredInt(PlayerPrefs.GetString("5f3bf5b30938ae565eaa5ffeff1babe3"));
        m_purchasedAxe     = new ObsecuredInt(PlayerPrefs.GetString("684c19d5b68aa835dc7444240d9bb309"));
        m_purchasedCossbow = new ObsecuredInt(PlayerPrefs.GetString("3a327194ca41d8ee1ceb4779da0200c8"));
        m_purchasedSnow    = new ObsecuredInt(PlayerPrefs.GetString("cffd8be9288fab9d702c845368980cec"));
        m_purchasedFire    = new ObsecuredInt(PlayerPrefs.GetString("7b0eacc9164c3e63ba470262763bc771"));
    }
Beispiel #2
0
	void Awake()
	{
		g_instance = this;
		
		m_isSound = PlayerPrefs.GetInt("IsSound", 1) != 0;
		m_isFirstTime = PlayerPrefs.GetInt("IsFirstTime", 1) != 0;
		
		m_currentScore = new ObsecuredInt(PlayerPrefs.GetString("d64148fac8fb5fc0d1847723e5741e6c"));
		m_highScore = new ObsecuredInt(PlayerPrefs.GetString("5f3bf5b30938ae565eaa5ffeff1babe3"));
		m_purchasedAxe = new ObsecuredInt(PlayerPrefs.GetString("684c19d5b68aa835dc7444240d9bb309"));
		m_purchasedCossbow = new ObsecuredInt(PlayerPrefs.GetString("3a327194ca41d8ee1ceb4779da0200c8"));
		m_purchasedSnow = new ObsecuredInt(PlayerPrefs.GetString("cffd8be9288fab9d702c845368980cec"));
		m_purchasedFire = new ObsecuredInt(PlayerPrefs.GetString("7b0eacc9164c3e63ba470262763bc771"));		
	}
    public void RefillPlayer()
    {
        if (refillBundles == null)
        {
            return;
        }
        if (player == null)
        {
            player = GlobalConstants.Player.GetComponent <PlayerStash>();
        }

        if (CheckPlayer(player.transform))
        {
            for (int i = 0; i < refillBundles.Length; ++i)
            {
                player.SendMessage(nameof(player.RefillResource), refillBundles[i]);
            }
        }
    }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        LevelController.instance = this;

        stash  = FindObjectOfType <PlayerStash>();
        player = FindObjectOfType <Player>();

        foreach (EnemySpawn spawn in GameObject.FindObjectsOfType <EnemySpawn>())
        {
            spawn.myEnemySpawned += EnemySpawned;

            if (spawn.gameObject.tag == "HardSpawn")
            {
                hardEnemySpawnsExtention.Add(spawn);
                spawn.gameObject.SetActive(false);
            }
            else
            {
                currentEnemySpawns.Add(spawn);
            }
        }
    }
 public void Start()
 {
     player = GlobalConstants.Player.GetComponent <PlayerStash>();
     InvokeRepeating(nameof(RefillPlayer), GlobalConstants.ResourceIncreaseTimer, GlobalConstants.ResourceIncreaseTimer);
 }
    // Use this for initialization
    void Start()
    {
        LevelController.instance = this;

        stash = FindObjectOfType<PlayerStash>();
        player = FindObjectOfType<Player>();

        foreach (EnemySpawn spawn in GameObject.FindObjectsOfType<EnemySpawn>())
        {
            spawn.myEnemySpawned += EnemySpawned;

            if (spawn.gameObject.tag == "HardSpawn")
            {
                hardEnemySpawnsExtention.Add(spawn);
                spawn.gameObject.SetActive(false);
            }
            else
            {
                currentEnemySpawns.Add(spawn);
            }
        }
    }
Beispiel #7
0
        static void CharacterInventory_InventoryIngredients_Post(CharacterInventory __instance, Tag _craftingStationTag, ref DictionaryExt <int, CompatibleIngredient> _sortedIngredient)
        {
            #region quit
            if (!_craftFromStash || PlayerStash == null)
            {
                return;
            }
            #endregion

            __instance.InventoryIngredients(_craftingStationTag, ref _sortedIngredient, PlayerStash.GetContainedItems());
        }
Beispiel #8
0
        static private void TryDisplayStashAmount(ItemDisplay itemDisplay)
        {
            #region quit
            if (!_displayStashAmount || PlayerStash == null ||
                !itemDisplay.m_lblQuantity.TryAssign(out var quantity) ||
                !itemDisplay.RefItem.TryAssign(out var item) ||
                item.OwnerCharacter == null &&
                item.ParentContainer.IsNot <MerchantPouch>() &&
                itemDisplay.IsNot <RecipeResultDisplay>())
            {
                return;
            }
            #endregion

            int stashAmount = itemDisplay is CurrencyDisplay ? PlayerStash.ContainedSilver : PlayerStash.ItemStackCount(item.ItemID);
            if (stashAmount <= 0)
            {
                return;
            }

            if (itemDisplay.IsNot <RecipeResultDisplay>())
            {
                quantity.text = itemDisplay.m_lastQuantity.ToString();
            }
            else if (itemDisplay.m_dBarUses.TryAssign(out var dotBar) && dotBar.GOActive())
            {
                quantity.text = "1";
            }

            int fontSize = (quantity.fontSize * 0.75f).Round();
            quantity.alignment   = TextAnchor.UpperRight;
            quantity.lineSpacing = 0.75f;
            quantity.text       += $"\n<color=#00FF00FF><size={fontSize}><b>+{stashAmount}</b></size></color>";
        }
Beispiel #9
0
 public void Start()
 {
     player = GlobalConstants.Player.GetComponent <PlayerStash>();
 }
Beispiel #10
0
 private void CloseStashWindow()
 {
     player.playerState  = PlayerState.Normal;
     openedStash         = null;
     _displayStashWindow = false;
 }