Пример #1
0
        public BuildRoomPlan(PlayerManager player, RoomTypes type, Vector2Int pos)
        {
            this.Player   = player;
            this.PlanType = PlanTypes.CreateUnit;

            this.TargetType     = type;
            this.TargetPosition = pos;

            this.Config = GameplayHolderManager.Instance.Configs.BuildingConfigs.Find((x) => x.Type == type);


            this.Delay = 2;
        }
Пример #2
0
 public static bool CheckExecutable(PlayerManager player, RoomTypes type, Vector2Int pos, BaseBuildingConfig config)
 {
     return(config != null && player.Resourcer.IsEnough(ResourceTypes.Fruit, config.FruitCost) &&
            player.Resourcer.IsEnough(ResourceTypes.Meat, config.MeatCost) && player.Nester.CanBuild(type, pos));
 }