MVP of the plane throwing game (#77)
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com> Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com> Reviewed-on: #77
This commit is contained in:
@@ -5,6 +5,7 @@ using AppleHills.Core.Settings;
|
||||
using Core.Lifecycle;
|
||||
using Core.Settings;
|
||||
using Input;
|
||||
using Minigames.Airplane.Settings;
|
||||
using Minigames.FortFight.Core;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -175,6 +176,7 @@ namespace Core
|
||||
var birdPooperSettings = SettingsProvider.Instance.LoadSettingsSynchronous<BirdPooperSettings>();
|
||||
var statueDressupSettings = SettingsProvider.Instance.LoadSettingsSynchronous<StatueDressupSettings>();
|
||||
var fortFightSettings = SettingsProvider.Instance.LoadSettingsSynchronous<FortFightSettings>();
|
||||
var airplaneSettings = SettingsProvider.Instance.LoadSettingsSynchronous<AirplaneSettings>();
|
||||
|
||||
|
||||
// Register settings with service locator
|
||||
@@ -257,11 +259,21 @@ namespace Core
|
||||
{
|
||||
Debug.LogError("Failed to load FortFightSettings");
|
||||
}
|
||||
|
||||
if (airplaneSettings != null)
|
||||
{
|
||||
ServiceLocator.Register<IAirplaneSettings>(airplaneSettings);
|
||||
Logging.Debug("AirplaneSettings registered successfully");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Failed to load AirplaneSettings");
|
||||
}
|
||||
|
||||
// Log success
|
||||
_settingsLoaded = playerSettings != null && interactionSettings != null && minigameSettings != null
|
||||
&& cardSystemSettings != null && birdPooperSettings != null && statueDressupSettings != null
|
||||
&& fortFightSettings != null;
|
||||
&& fortFightSettings != null && sortingGameSettings != null && airplaneSettings != null;
|
||||
if (_settingsLoaded)
|
||||
{
|
||||
Logging.Debug("All settings loaded and registered with ServiceLocator");
|
||||
|
||||
@@ -219,6 +219,9 @@ namespace AppleHills.Core.Settings
|
||||
/// </summary>
|
||||
public interface IFortFightSettings
|
||||
{
|
||||
// Slingshot Configuration
|
||||
Common.Input.SlingshotConfig SlingshotSettings { get; }
|
||||
|
||||
// Block configurations
|
||||
System.Collections.Generic.List<Minigames.FortFight.Settings.BlockMaterialConfig> MaterialConfigs { get; }
|
||||
System.Collections.Generic.List<Minigames.FortFight.Settings.BlockSizeConfig> SizeConfigs { get; }
|
||||
@@ -248,12 +251,6 @@ namespace AppleHills.Core.Settings
|
||||
int FortBlockLayer { get; } // Layer index for fort blocks
|
||||
int ProjectileLayer { get; } // Layer index for projectiles
|
||||
|
||||
// Slingshot Settings
|
||||
float BaseLaunchForce { get; } // Base launch force multiplier
|
||||
float MinForceMultiplier { get; } // Minimum force required to launch (0-1)
|
||||
float MaxForceMultiplier { get; } // Maximum force cap (0-2, usually 1)
|
||||
float TrajectoryLockDuration { get; } // How long to show trajectory after launch
|
||||
|
||||
// Projectile Abilities
|
||||
float VacuumSlideSpeed { get; } // Constant velocity for vacuum sliding (m/s)
|
||||
int VacuumDestroyBlockCount { get; } // Blocks to destroy while sliding
|
||||
@@ -279,4 +276,47 @@ namespace AppleHills.Core.Settings
|
||||
Minigames.FortFight.Settings.BlockMaterialConfig GetMaterialConfig(Minigames.FortFight.Data.BlockMaterial material);
|
||||
Minigames.FortFight.Settings.BlockSizeConfig GetSizeConfig(Minigames.FortFight.Data.BlockSize size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Interface for Airplane minigame settings
|
||||
/// </summary>
|
||||
public interface IAirplaneSettings
|
||||
{
|
||||
// Airplane Types - Get configuration by type
|
||||
Minigames.Airplane.Data.AirplaneTypeConfig GetAirplaneConfig(Minigames.Airplane.Data.AirplaneAbilityType type);
|
||||
Minigames.Airplane.Data.JetAbilityConfig JetAbilityConfig { get; }
|
||||
Minigames.Airplane.Data.BobbingAbilityConfig BobbingAbilityConfig { get; }
|
||||
Minigames.Airplane.Data.DropAbilityConfig DropAbilityConfig { get; }
|
||||
Minigames.Airplane.Data.AirplaneAbilityType DefaultAirplaneType { get; }
|
||||
|
||||
// Slingshot Configuration
|
||||
Common.Input.SlingshotConfig SlingshotSettings { get; }
|
||||
|
||||
// Flight Settings
|
||||
float AirplaneMass { get; }
|
||||
float MaxFlightTime { get; }
|
||||
|
||||
// Timing
|
||||
float IntroDuration { get; }
|
||||
float PersonIntroDuration { get; }
|
||||
float EvaluationDuration { get; }
|
||||
|
||||
// Spawn System
|
||||
float DynamicSpawnThreshold { get; }
|
||||
float TargetMinDistance { get; }
|
||||
float TargetMaxDistance { get; }
|
||||
float ObjectSpawnMinInterval { get; }
|
||||
float ObjectSpawnMaxInterval { get; }
|
||||
float PositiveNegativeRatio { get; } // 0-1, where 1 = all positive, 0 = all negative
|
||||
float SpawnDistanceAhead { get; }
|
||||
float GroundSpawnInterval { get; }
|
||||
|
||||
// Ground Snapping
|
||||
int GroundLayer { get; }
|
||||
float MaxGroundRaycastDistance { get; }
|
||||
float DefaultObjectYOffset { get; }
|
||||
|
||||
// Debug
|
||||
bool ShowDebugLogs { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user