예제 #1
0
 public void Show(int index, IPlayerFormation item)
 {
     if (item == null)
     {
         nameText.text = "";
         return;
     }
     nameText.text = index + ":" + item.GetHasCharacter().Character.title;
 }
예제 #2
0
    public void SetFormation(int index)
    {
        if (IPlayerFormation.DataMap.ContainsKey(index))
        {
            foreach (int key in IPlayerFormation.DataMap.Keys)
            {
                if (key >= 1 && key <= 5)
                {
                    if (IPlayerFormation.DataMap[key].itemId == HeroGuid)
                    {
                        IPlayerFormation.DataMap[key].itemId = "";
                    }
                }
            }

            IPlayerFormation.DataMap[index].itemId = HeroGuid;
        }
        else
        {
            foreach (int key in IPlayerFormation.DataMap.Keys)
            {
                if (key >= 1 && key <= 5)
                {
                    if (IPlayerFormation.DataMap[key].itemId == HeroGuid)
                    {
                        IPlayerFormation.DataMap[key].itemId = "";
                    }
                }
            }
            IPlayerFormation iPlayerFormation = new IPlayerFormation(index, "", HeroGuid);
            IPlayerFormation.DataMap.Add(index, iPlayerFormation);
        }
        IPlayerFormation.UpdataDataMap();
        //GameInstance.dbBattle.DoSetFormation(heroFormationData.HeroGuid, PlayerItem.characterDataMap[heroFormationData.HeroGuid].ItemID, "STAGE_FORMATION_A", index,
        //(formationListResult) =>
        //{
        //    PlayerFormation.SetDataRange(formationListResult.list);
        //    if (heroFormationData.callback != null)
        //    {
        //        heroFormationData.callback.Invoke();
        //    }
        //});
        if (callBack != null)
        {
            callBack.Invoke(index);
        }
        Close();
    }
예제 #3
0
파일: DBManager.cs 프로젝트: 517752548/-
 public void Init()
 {
     ConfigSQLite3Operate = SQLite3Factory.OpenToRead("Database.db");
     LocalSQLite3Operate  = SQLite3Factory.OpenToWrite("Dynamic.db");
     CheckTable();
     IPlayer.Init();
     IPlayerBattle.Init();
     ICharacter.Init();
     IEquipment.Init();
     IPlayerBattle.Init();
     IPlayerClearStage.Init();
     IPlayerCurrency.Init();
     IPlayerFormation.Init();
     IPlayerHasCharacters.Init();
     IPlayerHasEquips.Init();
     IPlayerOtherItem.Init();
     IPlayerStamina.Init();
     IPlayerUnlockItem.Init();
     //IPlayerHasEquips.InsertNewEquips("2001");
     //IPlayerHasCharacters.InsertNewCharacter("1001");
 }