Beispiel #1
0
        private void OnMouseDown()
        {
            float m       = (25 - 200) / (maxMass - minMass);
            int   maxLife = (int)(m * mass);

            try
            {
                var d                   = DataManager.LoadData <Data>();
                var acount              = d.GetAcount(Globals.playerName);
                DataSystem.Slime s      = acount.player.GetBestSlime();
                SlimeData        player = new SlimeData(s.mainType, s.life, s.maxLife, s.weight);
                SlimeData        enemy  = new SlimeData(type.ToString(), maxLife, maxLife, mass);
                StartCoroutine(CombatManager.InitBattle(player, enemy, 0));
            }
            catch (System.Exception e)
            {
                Debug.Log("error");
            }
        }