예제 #1
0
        private void AddChampionToInventoryIfAlive(SmartEntity building, bool createEntity)
        {
            BuildingTypeVO buildingType = building.BuildingComp.BuildingType;
            TroopTypeVO    troopTypeVO  = this.FindChampionTypeIfPlatform(buildingType);

            if (troopTypeVO == null)
            {
                return;
            }
            if (createEntity)
            {
                this.CreateChampionEntity(troopTypeVO, building);
            }
            CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>();

            currentPlayer.AddChampionToInventoryIfAlive(troopTypeVO.Uid);
        }