Example #1
0
    public void RemoveCreature()
    {
        GameDataManager mng = GameRoot.GetInstance().gameDataManager;

        mng.ChangeRoomSubData(currRoomId, currIndex, -1);
        RefreshInfo();
    }
Example #2
0
    public void ChangeCreature(List <int> list)
    {
        GameDataManager mng = GameRoot.GetInstance().gameDataManager;

        package.transform.DOMoveX(Screen.width * 3 / 2, 0.3f);
        int newCreature;

        if (list.Count > 0)
        {
            newCreature = list[0];
            //data change

            mng.ChangeRoomSubData(currRoomId, currIndex, newCreature);
        }
        PackageUI packageUI = package.GetComponentInChildren <PackageUI>();

        packageUI.SelectAction -= ChangeCreature;

        RefreshInfo();
    }