Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        lm           = new LegacyManager();
        potionCount  = lm.GetPotion();
        playerHealth = player.GetComponent <Damagable>();
        playerBehave = player.GetComponent <PlayerBehaviours>();


        if (potionText != null)
        {
            potionText.text = "X " + potionCount;
        }

        if (player == null)
        {
            return;
        }
        playerHealth.maxHealth = lm.GetMaxHealth();
        playerHealth.SetHealth(lm.GetCurrentHealth());


        //player.GetComponent<Damager>().damage = lm.GetDamage();
        playerBehave.attackDelay  = lm.GetAttackSpeed();
        playerBehave.maxArrowAmmo = lm.GetMaxArrow();

        if (playerBehave.ammoBar != null)
        {
            playerBehave.ammoBar.maxValue = lm.GetMaxArrow();
            playerBehave.ammoBar.value    = lm.GetMaxArrow();
        }
    }
Ejemplo n.º 2
0
        private static void ActivateInternal(Guid apiKey)
        {
            try
            {
                LegacyManager.CompleteMigration().RunSynchronously();
            }
            catch (Exception)
            {
            }
            YandexMetrica.MigrateApiKeys();
            LiteMetricaService liteMetricaService = Store.Get <LiteMetricaService>();

            if (((IEnumerable <Guid>)Critical.GetApiKeys()).Contains <Guid>(apiKey))
            {
                liteMetricaService.Wake(false, true);
            }
            else
            {
                Critical.AddApiKey(apiKey);
                liteMetricaService.Wake(true, true);
                Critical.Submit();
            }
            lock (YandexMetrica.CacheLock)
            {
                liteMetricaService.Report(YandexMetrica.Cache.ToArray());
                YandexMetrica.Cache.Clear();
                YandexMetrica._liteMetricaService = liteMetricaService;
            }
            liteMetricaService.ForceSend = true;
        }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        lm = new LegacyManager();
        int unlockedLevel = lm.GetLevel();

        for (int i = unlockedLevel; i > 0; i--)
        {
            levelButtons[i - 1].interactable = true;
        }
    }
Ejemplo n.º 4
0
    public void ClaimReward()
    {
        CombatAgent.Instance.OnBattleDone();

        LegacyManager lm = new LegacyManager();

        lm.SetCoin(lm.GetCoin() + reward);

        GetComponent <SceneLoader>().RemoveScene("Combat Chapter 1");
    }
Ejemplo n.º 5
0
    // Start is called before the first frame update
    void Start()
    {
        lm = new LegacyManager();

        for (int i = 0; i < lm.GetCharacter(); i++)
        {
            characterButton[i].interactable = true;
        }

        for (int i = 0; i < 6; i++)
        {
            bool isCollected = lm.CheckArcaCollected(i);
            loreButton[i].interactable = isCollected;
        }
    }
Ejemplo n.º 6
0
        public void OnAfterDeserialize()
        {
            Components.Clear();
            foreach (var row in ComponentsJSON)
            {
                var type = Type.GetType(row.AssemblyQualifiedName) ?? LegacyManager.GetTypeFromLegacy(row.AssemblyQualifiedName);

                if (type == null)
                {
                    Debug.LogError("Couldn't get type " + row.AssemblyQualifiedName);
                }

                Components.Add(
                    (ConnectionConfigurationBase)
                    JSONSerializer.Deserialize(type, row.JsonText,
                                               row.SerializedObjects));
            }
        }
Ejemplo n.º 7
0
    // Start is called before the first frame update
    void Start()
    {
        lm = new LegacyManager();

        maxArrow    = lm.GetMaxArrow();
        arrowDamage = lm.GetDamage();
        attackSpeed = lm.GetAttackSpeed();

        maxHealth = lm.GetMaxHealth();
        potion    = lm.GetPotion();
        coin      = lm.GetCoin();

        maxArrowText.text    = maxArrow.ToString();
        arrowDamageText.text = arrowDamage.ToString();
        attackSpeedText.text = attackSpeed.ToString();
        maxHealthText.text   = maxHealth.ToString();
        potionText.text      = potion.ToString();
        coinText.text        = coin.ToString();
    }
Ejemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     lm = new LegacyManager();
     setSfxVolume(lm.GetSFXVolume());
     setBgmVolume(lm.GetBGMVolume());
 }
Ejemplo n.º 9
0
 public void DoTheWork()
 {
     LegacyManager.DoTheWork();
 }
Ejemplo n.º 10
0
 public void DoEvenMoreWork()
 {
     LegacyManager.DoEvenMoreWork();
 }
Ejemplo n.º 11
0
 // Start is called before the first frame update
 void Start()
 {
     lm = new LegacyManager();
     sfxSlider.value = lm.GetSFXVolume();
     bgmSlider.value = lm.GetBGMVolume();
 }
Ejemplo n.º 12
0
 private void Start()
 {
     lm = new LegacyManager();
 }