Compare commits

..

65 Commits

Author SHA1 Message Date
Pal b43cd13d2e Merge branch 'main' of https://git.zenny.quest/zenayi/GameJamDungeon 2026-04-20 19:00:05 -07:00
Pal 433ed408d0 indicator added to steles, final sidebar render options added, affinity icons for UI added 2026-04-20 18:59:36 -07:00
zenny 9ca0a6d4e9 More implementation for planter 2026-04-16 23:30:29 -07:00
zenny d46f1ad210 Implement planter behavior (need to fix projectile attack) 2026-04-16 16:17:40 -07:00
Pal c2fca6a16f All Steles placed, some specific objects placed, secret NPC placed 2026-04-13 00:57:37 -07:00
Pal 87fdc85353 Minor visual and collision fixes. 6Z - MAZE collision got moved drastically seemingly. 2026-04-11 05:21:31 -07:00
Pal 87bb9422fe all final stages solidified 2026-04-11 05:02:22 -07:00
Pal 782592125a 4:3 Graphics Added, more of endgame finalized 2026-04-09 03:51:17 -07:00
Pal 6847af1f8b Affinity locations added, some decorations and final floors work 2026-04-08 01:19:51 -07:00
Pal 640145afe5 mostly near final version of true route GOG room + planter blasts 2026-04-06 17:25:57 -07:00
Pal cf0a520048 Fixed up most A1 specular textures, added some lamp parts, took out basin from basin room to be added as individually placed object. 2026-04-05 17:12:42 -07:00
Pal 69865cd23b Replaced Aqueos frames, edits to Planter 2026-04-03 23:53:21 -07:00
Pal 9cf8046fc3 Planter enemy added + Devic Balance 2026-04-03 17:48:37 -07:00
Pal 31e8b7fb01 Added all forms of enemies taking elemental damage + rust. Added on Sara.tscn and persuader and fist effect changed. added entropic sign visual 2026-04-01 16:47:05 -07:00
zenny 8630c6c1f3 Update icons in-game 2026-03-22 15:04:14 -07:00
Pal 83dbbba8e6 Finalized Item Icons + New Weapon Slashes 2026-03-20 16:23:51 -07:00
zenny f19cb7edda Rework projectiles and fix some demon wall attacks
Still working on Demon Wall boss fight overall
2026-03-09 22:05:53 -07:00
zenny 2c26d6f548 Fix ambassador walk animations to only move while moving arms, fix attack animation hitboxes for them too
Make Chinthe check for safe landing zone before teleporting behind player
Adjust size of Palan/Agni/Shield
2026-03-04 19:26:45 -08:00
zenny 70f9807b6c Minor fixes 2026-03-03 22:24:05 -08:00
zenny ff82f51451 Block on events where the inventory will close after, block in general to prevent inventory scrolling during inventory message display 2026-03-03 18:59:09 -08:00
zenny 7b6ca68e65 Rust 2026-03-02 22:28:23 -08:00
zenny 701e7b0858 Fix receiving items from boxes 2026-03-02 18:17:57 -08:00
zenny e6937244ec Move line of code to move item spawn position after being added to node tree 2026-03-02 15:32:35 -08:00
zenny c4150e78fa Fixed item spawn locations, make filth eater stop firing animation on death 2026-03-02 14:35:48 -08:00
zenny 28f38d236e Show inventory alert when equipping/unequipping/augmenting items 2026-03-02 10:33:58 -08:00
zenny bc010a7d82 Started implementation of information about item used screen 2026-03-02 01:57:43 -08:00
zenny 46f0e78405 Apply that physics interpolation thing to warping enemies with items 2026-03-01 18:06:48 -08:00
zenny 840ffe1a9a Fix really really really annoying issue with enemy spawns
Godot refuses to set CharacterBody3D positions correctly unless you call ResetPhysicsInterpolation immediately after
2026-03-01 17:54:34 -08:00
zenny e50035d9c7 Revert some pathing stuff, adjust general spawn rates 2026-03-01 16:34:18 -08:00
zenny 721a45c6bb Fix some boxes and global positioning 2026-02-26 22:56:57 -08:00
zenny 0c4a424a4d Fixed teleport enemies bug (swapped Y and Z values....) 2026-02-26 20:06:18 -08:00
zenny c043c6ad04 Animation update 2026-02-26 19:13:47 -08:00
zenny bf168a2577 Add some on-screen FX for some items 2026-02-26 02:56:16 -08:00
zenny fadb1652d4 Add more spell effects 2026-02-26 02:09:38 -08:00
zenny a686ce2fbc Switch navigation mesh to be based on collision only, not collision and texture meshes
Will need to finetune enemy navigation agent placement depending on if they're now too high/low to sit in the navigation region
2026-02-25 22:33:38 -08:00
zenny 9d18bbb349 Fix up projectiles 2026-02-24 12:28:01 -08:00
zenny 846c8a4c59 2-24-16 build changes 2026-02-24 10:39:34 -08:00
zenny 3c1a221522 Enemy viewer fixes 2026-02-23 10:36:08 -08:00
zenny e77ca00002 Fix up enemy viewer, reduce some memory footprint 2026-02-20 01:02:03 -08:00
zenny fd1eb77f57 Fix full size image scaling 2026-02-19 02:15:46 -08:00
zenny 6e3175fb99 Add more implementation for gallery menu 2026-02-19 02:12:32 -08:00
zenny 104b9cf25e Rework item descriptions, fix item rescue menu 2026-02-18 02:41:22 -08:00
zenny d39524ffe2 Feedback changes 2026-02-17 15:46:16 -08:00
zenny 8920b5057f Fix up palan and shield of heaven a little bit 2026-02-17 13:52:06 -08:00
zenny 7393662aa8 Fix spawn heights and debug menu enemy spawning 2026-02-17 12:27:26 -08:00
zenny 37ad0048d7 Small augment menu fix, fix hp regen rate 2026-02-17 10:20:54 -08:00
zenny 922d8fde59 Adjust altar scaling 2026-02-17 10:10:42 -08:00
zenny d5e3f1b89b Fix dropped item texture issue 2026-02-17 01:21:53 -08:00
zenny ac44803d71 the walk SFX stays pausable 2026-02-17 01:02:07 -08:00
zenny 02e6ee2f70 Test masks and finish implementing armor 2026-02-17 00:50:19 -08:00
zenny 0ec0ff2e23 Finish armor testing 2026-02-17 00:14:19 -08:00
zenny 1042b86d2b Fix really annoying bug on focus modes. i forgot what else i did but probably added armor 2026-02-16 23:56:16 -08:00
zenny 017be896f3 Weapons tested and general changes made to support the results of those tests 2026-02-16 16:44:36 -08:00
zenny a2ceb8e650 Shrink clouds 2026-02-16 14:55:24 -08:00
zenny 366ed9f5e6 Beeg fixpack 2026-02-16 03:30:45 -08:00
zenny f09d6ac8e8 Wave of item effects and implementation 2026-02-15 22:44:43 -08:00
zenny 5233da4225 Various cleanup 2026-02-15 20:35:05 -08:00
zenny 1a1e050dcc Update icons 2026-02-15 15:00:36 -08:00
Pal 7e56202e76 Merge branch 'main' of https://git.zenny.quest/zenayi/GameJamDungeon 2026-02-15 03:04:47 -08:00
Pal fc04a93f58 Pixel Art Resizes Added + fix of 2 3D render icons 2026-02-15 03:04:42 -08:00
zenny fa66ba24e2 Small inventory fixes 2026-02-15 02:58:10 -08:00
zenny 9c4c82af68 All items have an image 2026-02-15 02:56:26 -08:00
zenny fe502debd1 Fix inventory sizes 2026-02-15 02:33:09 -08:00
zenny 33a58a2893 Fix box issue 2026-02-15 02:24:14 -08:00
zenny 69b25aacb9 Overhaul item and inventory and clean up bits and pieces 2026-02-15 01:19:27 -08:00
5363 changed files with 102671 additions and 34021 deletions
@@ -15,4 +15,6 @@ public interface IAttackComponent : IEntityComponent
public void SetAttack(int attack);
public void RaiseMaximumAttack(int raiseAmount);
public void LowerMaximumAttack(int lowerAmount);
}
@@ -15,4 +15,6 @@ public interface IDefenseComponent : IEntityComponent
public void SetDefense(int attack);
public void RaiseMaximumDefense(int raiseAmount);
public void LowerMaximumDefense(int lowerAmount);
}
@@ -1,5 +1,4 @@
using Chickensoft.Collections;
using Godot;
using Zennysoft.Ma.Adapter.Entity;
namespace Zennysoft.Ma.Adapter;
@@ -20,5 +20,9 @@ public interface IExperiencePointsComponent : IEntityComponent
public void LevelUp();
public void LevelDown();
public event Action PlayerLevelUp;
public event Action PlayerLevelDown;
}
@@ -22,4 +22,6 @@ public interface IHealthComponent : IEntityComponent
public void SetMaximumHealth(int health);
public void RaiseMaximumHP(int raiseAmount, bool restoreHP = false);
public void LowerMaximumHP(int lowerAmount);
}
@@ -0,0 +1,13 @@
using Chickensoft.Collections;
using Godot;
using Zennysoft.Ma.Adapter;
public interface IStatusEffectComponent : IEntityComponent
{
[Export] public double RustDuration { get; set; }
public AutoProp<bool> Rust { get; }
public bool ImmuneToRust { get; set; }
}
@@ -4,7 +4,11 @@ namespace Zennysoft.Ma.Adapter;
public interface ILuckComponent : IEntityComponent
{
public int InitialLuck { get; }
public IAutoProp<int> Luck { get; }
public void IncreaseLuck(int value);
void DecreaseLuck(int value);
}
@@ -18,5 +18,7 @@ public interface IVTComponent : IEntityComponent
public void RaiseMaximumVT(int raiseAmount, bool restoreVT = true);
public void LowerMaximumVT(int lowerAmount);
public void SetMaximumVT(int vt);
}
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://c7e5g8l6wuph"]
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" uid="uid://87d8kluait8y" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"]
[ext_resource type="Script" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"]
[node name="NavigationAgent" type="NavigationAgent3D"]
avoidance_enabled = true
@@ -31,6 +31,8 @@ namespace Zennysoft.Ma.Adapter.Entity
public IDefenseComponent DefenseComponent { get; }
public IStatusEffectComponent StatusEffectComponent { get; }
public ElementalResistanceSet ElementalResistanceSet { get; }
public int InitialHP { get; }
@@ -0,0 +1,11 @@
namespace Zennysoft.Ma.Adapter;
public enum SpellFXEnum
{
AnBradan,
DivinityRecall,
ItemBreak,
Kyuuketsuki,
Persiko,
Radial
}
@@ -1,16 +1,26 @@
using Zennysoft.Ma.Adapter;
using Godot;
using Zennysoft.Ma.Adapter;
public class Augment
{
public JewelTags AugmentTag;
public Augment(JewelTags tag, IAugmentType augment)
public Augment(JewelTags tag, IAugmentType augment, string name, string description, Texture2D augmentTexture)
{
AugmentTag = tag;
AugmentName = name;
AugmentType = augment;
AugmentDescription = description;
AugmentTexture = augmentTexture;
}
public IAugmentType AugmentType { get; set; }
public string AugmentName { get; set; }
public string AugmentDescription { get; set; }
public Texture2D AugmentTexture { get; set; }
}
public class HPRecoverySpeedAugment : IAugmentType
@@ -94,6 +104,33 @@ public class LowerEXPRateAugment : IAugmentType
public void Remove() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value + 0.25f);
}
public class BoostStatsAugment : IAugmentType
{
private readonly IPlayer _player;
private readonly int _bonusLuck;
private readonly int _bonusHp;
private readonly int _bonusVt;
public BoostStatsAugment(IPlayer player, int bonusLuck, int bonusHp, int bonusVt)
{
_player = player;
_bonusLuck = bonusLuck;
_bonusHp = bonusHp;
_bonusVt = bonusVt;
}
public void Apply()
{
_player.HealthComponent.RaiseMaximumHP(_bonusHp);
_player.VTComponent.RaiseMaximumVT(_bonusVt);
_player.LuckComponent.IncreaseLuck(_bonusLuck);
}
public void Remove()
{
}
}
public class LowerHPRecoveryAugment : IAugmentType
{
private readonly IPlayer _player;
@@ -4,5 +4,6 @@ public enum AccessoryTag
{
None,
HalfVTConsumption,
StatusEffectImmunity
StatusEffectImmunity,
BoostEXPGainRate
}
@@ -0,0 +1,7 @@
namespace Zennysoft.Ma.Adapter;
public enum ArmorTag
{
None,
DegradeOnHit
}
@@ -3,7 +3,7 @@
public enum ItemTag
{
None,
BreaksOnChange,
BreaksOnFloorExit,
MysteryItem,
DamagesPlayer,
ContainsRestorative,
@@ -20,5 +20,8 @@ public enum ItemTag
RestrictUnequip,
UnequipAllItems,
EjectAllItems,
UseAllItems
UseAllItems,
GlueOnEquip,
BreaksOnUnequip,
ContainsJewel
}
@@ -14,11 +14,26 @@ public enum UsableItemTag
DealElementalDamageToAllEnemiesInRoom,
RaiseCurrentWeaponAttack,
RaiseCurrentDefenseArmor,
LowerCurrentDefenseArmor,
RaiseLevel,
LowerLevel,
RandomEffect,
DoubleExp,
LowerTargetTo1HP,
CanChangeAffinity,
TeleportToRandomLocation,
WarpToExitIfFound
WarpToExitIfFound,
IncreaseDefense,
IncreaseLuck,
IncreaseAttack,
DecreaseDefense,
DecreaseLuck,
DecreaseAttack,
DecreaseAllStats,
Clone,
MeltAllEquipment,
RestoreStats,
GlueAllEquipment,
DoubleStackedItems,
IdentifyRandomItem
}
@@ -15,4 +15,4 @@ public enum WeaponTag
TripleAttack,
ElementalProjectile,
KineticProjectile
}
}
@@ -16,18 +16,8 @@ public interface IGameRepo : IDisposable
event Action<string>? AnnounceMessageInInventoryEvent;
event Action<int>? DoubleExpTimeStart;
event Action? DoubleExpTimeEnd;
event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
event Action? PlayerAttack;
event Action? PlayerAttackedWall;
event Action? PlayerAttackedEnemy;
event Action<IEquipableItem>? EquippedItem;
event Action<IEquipableItem>? UnequippedItem;
@@ -40,20 +30,12 @@ public interface IGameRepo : IDisposable
IAutoProp<bool> IsPaused { get; }
public void StartDoubleEXP(TimeSpan lengthOfEffect);
public void EndDoubleExp();
public void AnnounceMessageOnMainScreen(string message);
public void AnnounceMessageInInventory(string message);
public void RemoveItemFromInventory(IBaseInventoryItem item);
public void OnPlayerAttack();
public void OnPlayerAttackedWall();
public void CloseInventory();
public void GameEnded();
@@ -63,8 +45,6 @@ public interface IGameRepo : IDisposable
public void OnUnequippedItem(IEquipableItem item);
public void OnEnemyDied(IEnemy enemy);
public double ExpRate { get; }
}
public class GameRepo : IGameRepo
@@ -73,26 +53,18 @@ public class GameRepo : IGameRepo
public event Action? CloseInventoryEvent;
public event Action<string>? AnnounceMessageOnMainScreenEvent;
public event Action<string>? AnnounceMessageInInventoryEvent;
public event Action<int>? DoubleExpTimeStart;
public event Action? DoubleExpTimeEnd;
public event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
public event Action? PlayerAttack;
public event Action? PlayerAttackedWall;
public event Action? PlayerAttackedEnemy;
public event Action<IEquipableItem>? EquippedItem;
public event Action<IEquipableItem>? UnequippedItem;
public event Action<IEnemy>? EnemyDied;
public IAutoProp<bool> IsPaused => _isPaused;
private readonly AutoProp<bool> _isPaused;
public double ExpRate { get; private set; }
private bool _disposedValue;
public GameRepo()
{
_isPaused = new AutoProp<bool>(true);
ExpRate = 1;
}
public void Pause()
@@ -107,20 +79,6 @@ public class GameRepo : IGameRepo
GD.Print("Resume");
}
public void StartDoubleEXP(TimeSpan lengthOfEffect)
{
AnnounceMessageInInventory("Experience points temporarily doubled.");
DoubleExpTimeStart?.Invoke(lengthOfEffect.Seconds);
ExpRate *= 2;
}
public void EndDoubleExp()
{
AnnounceMessageOnMainScreen("Experience points effect wore off.");
DoubleExpTimeEnd?.Invoke();
ExpRate /= 2;
}
public void AnnounceMessageOnMainScreen(string message)
{
AnnounceMessageOnMainScreenEvent?.Invoke(message);
@@ -136,16 +94,6 @@ public class GameRepo : IGameRepo
RemoveItemFromInventoryEvent?.Invoke(item);
}
public void OnPlayerAttack()
{
PlayerAttack?.Invoke();
}
public void OnPlayerAttackedWall()
{
PlayerAttackedWall?.Invoke();
}
public void CloseInventory()
{
CloseInventoryEvent?.Invoke();
@@ -2,4 +2,9 @@
public interface IArmor : IEquipableItem, IAugmentableItem
{
public void IncreaseArmorDefense(int bonus);
public void DecreaseArmorDefense(int lowerAmount);
public ArmorTag ArmorTag { get; }
}
@@ -5,7 +5,8 @@ using Zennysoft.Ma.Adapter;
public interface IBaseInventoryItem
{
public string ItemName { get; }
public string Description { get; }
public string StatDescription { get; }
public string FlavorText { get; }
public float SpawnRate { get; }
public int ThrowDamage { get; }
public float ThrowSpeed { get; }
@@ -1,16 +1,38 @@
using Chickensoft.Introspection;
using Chickensoft.Serialization;
using Chickensoft.Serialization;
namespace Zennysoft.Ma.Adapter;
[Meta, Id("rescued_items")]
public partial class RescuedItemDatabase
public class RescuedItemDatabase
{
[Save("rescued_item_list")]
public List<IBaseInventoryItem> Items { get; init; }
private List<IBaseInventoryItem> _items { get; init; }
private int _maxSize { get; init; } = 20;
public RescuedItemDatabase()
public RescuedItemDatabase(int maxSize)
{
Items = new List<IBaseInventoryItem>();
_items = [];
_maxSize = maxSize;
}
public RescuedItemDatabase(List<IBaseInventoryItem> items, int maxSize)
{
_items = items;
_maxSize = maxSize;
}
public bool TryAdd(IBaseInventoryItem item)
{
if (_items.Count >= _maxSize)
return false;
if (item is IEquipableItem equipable)
equipable.Glued = false;
_items.Add(item);
return true;
}
public void Remove(IBaseInventoryItem item) => _items.Remove(item);
public List<IBaseInventoryItem> GetItems() => _items;
public void Clear() => _items.Clear();
}
@@ -18,4 +18,19 @@ public partial class UsableItemTagEnumContext : JsonSerializerContext;
public partial class BoxItemTagEnumContext : JsonSerializerContext;
[JsonSerializable(typeof(ElementType))]
public partial class ElementTypeEnumContext : JsonSerializerContext;
public partial class ElementTypeEnumContext : JsonSerializerContext;
[JsonSerializable(typeof(JewelTags))]
public partial class JewelTagsEnumContext : JsonSerializerContext;
[JsonSerializable(typeof(IBaseInventoryItem))]
public partial class BaseInventoryItemContext : JsonSerializerContext
{
}
[JsonSerializable(typeof(RescuedItemDatabase))]
public partial class RescuedItemDatabaseContext : JsonSerializerContext
{
}
@@ -11,7 +11,5 @@ public interface IDungeonFloor : INode3D
public ImmutableList<IDungeonRoom> Rooms { get; }
public void FadeOutAudio();
public bool FloorIsLoaded { get; set; }
}
@@ -10,8 +10,6 @@ public class Module
public static void Bootstrap(Container container)
{
container.RegisterSingleton<IFileSystem, FileSystem>();
container.RegisterSingleton<ISaveFileManager, SaveFileManager>();
container.RegisterSingleton<IMaSaveFileManager, MaSaveFileManager>();
container.RegisterSingleton<IGameRepo, GameRepo>();
container.RegisterSingleton<IGameState, GameState>();
container.RegisterSingleton<IDimmableAudioStreamPlayer, DimmableAudioStreamPlayer>();
@@ -28,7 +28,7 @@ public interface IPlayer : IKillable, ICharacterBody3D
public void ApplyNewAugment(IAugmentItem jewel, IAugmentableItem equipableItem);
public void IdentifyItem(IBaseInventoryItem unidentifiedItem);
public IBaseInventoryItem IdentifyItem(IBaseInventoryItem unidentifiedItem);
public IInventory Inventory { get; }
@@ -46,10 +46,14 @@ public interface IPlayer : IKillable, ICharacterBody3D
public IEquipmentComponent EquipmentComponent { get; }
public IStatusEffectComponent StatusEffectComponent { get; }
public void SetHealthTimerStatus(bool isActive);
public void ModifyHealthTimerSpeed(float newModifier);
public void PlaySpellFX(SpellFXEnum spellEnum);
public bool AutoRevive { get; set; }
public int TotalAttack { get; }
@@ -1,31 +0,0 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization.Metadata;
using Zennysoft.Game.Abstractions;
namespace Zennysoft.Ma.Adapter;
public interface IMaSaveFileManager
{
Task Save<T>(T gameData);
Task<T?> Load<T>();
}
public sealed class MaSaveFileManager : IMaSaveFileManager
{
private readonly ISaveFileManager _saveFileManager;
private ImmutableList<IJsonTypeInfoResolver> _converters;
public MaSaveFileManager(ISaveFileManager saveFileManager)
{
_saveFileManager = saveFileManager;
_converters = [WeaponTagEnumContext.Default, ItemTagEnumContext.Default, ElementTypeEnumContext.Default, AccessoryTagEnumContext.Default, UsableItemTagEnumContext.Default, BoxItemTagEnumContext.Default];
}
public async Task Save<T>(T gameData)
{
await _saveFileManager.WriteToFile(gameData, [.. _converters]);
}
public async Task<T?> Load<T>() => await _saveFileManager.ReadFromFile<T>([.. _converters]);
}
@@ -31,4 +31,8 @@
<ProjectReference Include="..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Save\" />
</ItemGroup>
</Project>
+61
View File
@@ -0,0 +1,61 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35222.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ma", "Ma.csproj", "{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Abstractions", "..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj", "{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Implementation", "..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj", "{F6808C1C-EDFB-4602-BA01-34FB682A270C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Ma.Adapter", "..\Zennysoft.Game.Ma.Implementation\Zennysoft.Ma.Adapter.csproj", "{CC55EDC3-B9EA-4393-BE4D-630C34393A94}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
ExportDebug|Any CPU = ExportDebug|Any CPU
ExportRelease|Any CPU = ExportRelease|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Release|Any CPU.ActiveCfg = ExportRelease|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Release|Any CPU.Build.0 = ExportRelease|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Release|Any CPU.Build.0 = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Release|Any CPU.Build.0 = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {797FF6A1-5959-42C9-A7A2-A8D39F9AC1A4}
EndGlobalSection
EndGlobal
@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://civ6shmka5e8u"]
[gd_scene load_steps=4 format=3 uid="uid://ekf8y405ewyq"]
[ext_resource type="Script" uid="uid://klpiq4tk3t7a" path="res://addons/dialogue_manager/components/code_edit_syntax_highlighter.gd" id="1_58cfo"]
[ext_resource type="Script" uid="uid://djeybvlb332mp" path="res://addons/dialogue_manager/components/code_edit.gd" id="1_g324i"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://qdxrxv3c3hxk"]
[gd_scene load_steps=3 format=3 uid="uid://cstps104wl17j"]
[ext_resource type="Script" uid="uid://kpwo418lb2t2" path="res://addons/dialogue_manager/components/download_update_panel.gd" id="1_4tm1k"]
[ext_resource type="Texture2D" uid="uid://d3baj6rygkb3f" path="res://addons/dialogue_manager/assets/update.svg" id="2_4o2m6"]
@@ -1,8 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://ycn6uaj7dsrh"]
[gd_scene load_steps=4 format=3 uid="uid://bsal283gclopj"]
[ext_resource type="Script" uid="uid://dooe2pflnqtve" path="res://addons/dialogue_manager/components/editor_property/editor_property_control.gd" id="1_het12"]
[ext_resource type="PackedScene" uid="uid://b16uuqjuof3n5" path="res://addons/dialogue_manager/components/editor_property/resource_button.tscn" id="2_hh3d4"]
[ext_resource type="PackedScene" uid="uid://dnufpcdrreva3" path="res://addons/dialogue_manager/components/files_list.tscn" id="3_l8fp6"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/components/editor_property/resource_button.tscn" id="2_hh3d4"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/components/files_list.tscn" id="3_l8fp6"]
[node name="PropertyEditorButton" type="HBoxContainer"]
offset_right = 40.0
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://b16uuqjuof3n5"]
[gd_scene load_steps=2 format=3 uid="uid://bylecer7aexlb"]
[ext_resource type="Script" uid="uid://damhqta55t67c" path="res://addons/dialogue_manager/components/editor_property/resource_button.gd" id="1_7u2i7"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://cs8pwrxr5vxix"]
[gd_scene load_steps=4 format=3 uid="uid://c3pniua1enw8v"]
[ext_resource type="Script" uid="uid://d2l8nlb6hhrfp" path="res://addons/dialogue_manager/components/errors_panel.gd" id="1_nfm3c"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://dnufpcdrreva3"]
[gd_scene load_steps=3 format=3 uid="uid://b21h8gsbo60xg"]
[ext_resource type="Script" uid="uid://dqa4a4wwoo0aa" path="res://addons/dialogue_manager/components/files_list.gd" id="1_cytii"]
[ext_resource type="Texture2D" uid="uid://d3lr2uas6ax8v" path="res://addons/dialogue_manager/assets/icon.svg" id="2_3ijx1"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://0n7hwviyyly4"]
[gd_scene load_steps=3 format=3 uid="uid://c5to0aeerreb4"]
[ext_resource type="Script" uid="uid://q368fmxxa8sd" path="res://addons/dialogue_manager/components/find_in_files.gd" id="1_3xicy"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://gr8nakpbrhby"]
[gd_scene load_steps=2 format=3 uid="uid://xnv1ojlgiss3"]
[ext_resource type="Script" uid="uid://cijsmjkq21cdq" path="res://addons/dialogue_manager/components/search_and_replace.gd" id="1_8oj1f"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://ctns6ouwwd68i"]
[gd_scene load_steps=2 format=3 uid="uid://b7v2agbddgaoi"]
[ext_resource type="Script" uid="uid://d0k2wndjj0ifm" path="res://addons/dialogue_manager/components/title_list.gd" id="1_5qqmd"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://co8yl23idiwbi"]
[gd_scene load_steps=3 format=3 uid="uid://c1dliyrsif5jj"]
[ext_resource type="Script" uid="uid://cr1tt12dh5ecr" path="res://addons/dialogue_manager/components/update_button.gd" id="1_d2tpb"]
[ext_resource type="PackedScene" uid="uid://qdxrxv3c3hxk" path="res://addons/dialogue_manager/components/download_update_panel.tscn" id="2_iwm7r"]
[ext_resource type="PackedScene" uid="uid://cstps104wl17j" path="res://addons/dialogue_manager/components/download_update_panel.tscn" id="2_iwm7r"]
[node name="UpdateButton" type="Button"]
visible = false
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://ckvgyvclnwggo"]
[gd_scene load_steps=2 format=3 uid="uid://b0sflwm2j27gu"]
[ext_resource type="Script" uid="uid://g32um0mltv5d" path="res://addons/dialogue_manager/dialogue_label.gd" id="1_cital"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=9 format=3 uid="uid://73jm5qjy52vq"]
[gd_scene load_steps=9 format=3 uid="uid://bs44fggx87t73"]
[ext_resource type="Script" uid="uid://5b3w40kwakl3" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_36de5"]
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_a8ve6"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_a8ve6"]
[ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_72ixx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://13s5spsk34qu"]
[gd_scene load_steps=10 format=3 uid="uid://c4tqvq4mjcfv2"]
[ext_resource type="Script" uid="uid://5b3w40kwakl3" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_s2gbs"]
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_hfvdi"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_hfvdi"]
[ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_1j1j0"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_235ry"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://ugd552efvil0"]
[gd_scene load_steps=2 format=3 uid="uid://c3ty75yb1un26"]
[ext_resource type="Script" uid="uid://c8e16qdgu40wo" path="res://addons/dialogue_manager/test_scene.gd" id="1_yupoh"]
@@ -1,15 +1,15 @@
[gd_scene load_steps=16 format=3 uid="uid://cbuf1q3xsse3q"]
[gd_scene load_steps=16 format=3 uid="uid://b2lot8kdw2snd"]
[ext_resource type="Script" uid="uid://cipjcc7bkh1pc" path="res://addons/dialogue_manager/views/main_view.gd" id="1_h6qfq"]
[ext_resource type="PackedScene" uid="uid://civ6shmka5e8u" path="res://addons/dialogue_manager/components/code_edit.tscn" id="2_f73fm"]
[ext_resource type="PackedScene" uid="uid://dnufpcdrreva3" path="res://addons/dialogue_manager/components/files_list.tscn" id="2_npj2k"]
[ext_resource type="PackedScene" uid="uid://ctns6ouwwd68i" path="res://addons/dialogue_manager/components/title_list.tscn" id="2_onb4i"]
[ext_resource type="PackedScene" uid="uid://co8yl23idiwbi" path="res://addons/dialogue_manager/components/update_button.tscn" id="2_ph3vs"]
[ext_resource type="PackedScene" uid="uid://gr8nakpbrhby" path="res://addons/dialogue_manager/components/search_and_replace.tscn" id="6_ylh0t"]
[ext_resource type="PackedScene" uid="uid://cs8pwrxr5vxix" path="res://addons/dialogue_manager/components/errors_panel.tscn" id="7_5cvl4"]
[ext_resource type="PackedScene" uid="uid://ekf8y405ewyq" path="res://addons/dialogue_manager/components/code_edit.tscn" id="2_f73fm"]
[ext_resource type="PackedScene" uid="uid://b21h8gsbo60xg" path="res://addons/dialogue_manager/components/files_list.tscn" id="2_npj2k"]
[ext_resource type="PackedScene" uid="uid://b7v2agbddgaoi" path="res://addons/dialogue_manager/components/title_list.tscn" id="2_onb4i"]
[ext_resource type="PackedScene" uid="uid://c1dliyrsif5jj" path="res://addons/dialogue_manager/components/update_button.tscn" id="2_ph3vs"]
[ext_resource type="PackedScene" uid="uid://xnv1ojlgiss3" path="res://addons/dialogue_manager/components/search_and_replace.tscn" id="6_ylh0t"]
[ext_resource type="PackedScene" uid="uid://c3pniua1enw8v" path="res://addons/dialogue_manager/components/errors_panel.tscn" id="7_5cvl4"]
[ext_resource type="Script" uid="uid://klpiq4tk3t7a" path="res://addons/dialogue_manager/components/code_edit_syntax_highlighter.gd" id="7_necsa"]
[ext_resource type="Texture2D" uid="uid://cnm67htuohhlo" path="res://addons/dialogue_manager/assets/banner.png" id="9_y6rqu"]
[ext_resource type="PackedScene" uid="uid://0n7hwviyyly4" path="res://addons/dialogue_manager/components/find_in_files.tscn" id="10_yold3"]
[ext_resource type="PackedScene" uid="uid://c5to0aeerreb4" path="res://addons/dialogue_manager/components/find_in_files.tscn" id="10_yold3"]
[sub_resource type="Image" id="Image_y6rqu"]
data = {
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://b7mst0qu7vjk1"]
[gd_scene load_steps=3 format=3 uid="uid://bf5kpeg711bo8"]
[ext_resource type="Script" uid="uid://dcff0mowkn6km" path="res://addons/input_helper/components/download_update_panel.gd" id="1_4tm1k"]
[ext_resource type="Texture2D" uid="uid://ddixs2ish5bi6" path="res://addons/input_helper/assets/update.svg" id="2_j7shv"]
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://bownbkcmm43gn"]
[gd_scene load_steps=3 format=3 uid="uid://bsi3bm7ig32p"]
[ext_resource type="PackedScene" uid="uid://b7mst0qu7vjk1" path="res://addons/input_helper/components/download_update_panel.tscn" id="1_37q37"]
[ext_resource type="PackedScene" uid="uid://bf5kpeg711bo8" path="res://addons/input_helper/components/download_update_panel.tscn" id="1_37q37"]
[ext_resource type="Script" uid="uid://1t3qhgrro2es" path="res://addons/input_helper/views/download_dialog.gd" id="1_ltktf"]
[node name="DownloadDialog" type="AcceptDialog"]
+7 -2
View File
@@ -1,9 +1,12 @@
[gd_resource type="AudioBusLayout" load_steps=4 format=3 uid="uid://c2mk6c27y0mdf"]
[gd_resource type="AudioBusLayout" load_steps=5 format=3 uid="uid://c2mk6c27y0mdf"]
[sub_resource type="AudioEffectLimiter" id="AudioEffectLimiter_j3pel"]
resource_name = "Limiter"
soft_clip_db = 1.0
[sub_resource type="AudioEffectHardLimiter" id="AudioEffectHardLimiter_j3pel"]
resource_name = "HardLimiter"
[sub_resource type="AudioEffectReverb" id="AudioEffectReverb_j3pel"]
resource_name = "Reverb"
room_size = 0.5
@@ -20,7 +23,9 @@ soft_clip_db = 1.5
[resource]
bus/0/volume_db = -0.130497
bus/0/effect/0/effect = SubResource("AudioEffectLimiter_j3pel")
bus/0/effect/0/enabled = true
bus/0/effect/0/enabled = false
bus/0/effect/1/effect = SubResource("AudioEffectHardLimiter_j3pel")
bus/0/effect/1/enabled = true
bus/1/name = &"AMBIENT"
bus/1/solo = false
bus/1/mute = false
+1 -1
View File
@@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="Export/Ma.exe"
export_path="../../Demo/Export.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
+15 -6
View File
@@ -8,6 +8,10 @@
config_version=5
[animation]
warnings/check_invalid_track_paths=false
[application]
config/name="Ma"
@@ -36,6 +40,7 @@ runtime/advanced/uses_dotnet=true
window/size/viewport_width=1920
window/size/viewport_height=1080
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
[dotnet]
@@ -82,6 +87,7 @@ import/blender/enabled=false
[global_group]
DimmableAudio=""
enemy=""
[importer_defaults]
@@ -254,11 +260,15 @@ AltAttack={
CameraForward={
"deadzone": 0.2,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194446,"key_label":0,"unicode":56,"location":0,"echo":false,"script":null)
]
}
CameraBack={
"deadzone": 0.2,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194440,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
]
}
EnemyViewerIdle={
@@ -274,7 +284,7 @@ EnemyViewerWalk={
[internationalization]
locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialogue", "res://src/npc/Ran/ran.dialogue", "res://src/npc/Rat/ratdialogue.dialogue", "res://src/dialog/Altar.dialogue", "res://stone.dialogue", "res://src/npc/Proscenium/JumpScare.dialogue", "res://tutorialstone.dialogue")
locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialogue", "res://src/npc/Ran/ran.dialogue", "res://src/npc/Rat/ratdialogue.dialogue", "res://src/dialog/Altar.dialogue", "res://stone.dialogue", "res://src/npc/Proscenium/JumpScare.dialogue")
[layer_names]
@@ -310,19 +320,18 @@ textures/canvas_textures/default_texture_filter=0
textures/lossless_compression/force_png=true
lights_and_shadows/directional_shadow/soft_shadow_filter_quality=4
lights_and_shadows/directional_shadow/16_bits=false
lights_and_shadows/positional_shadow/soft_shadow_filter_quality=3
lights_and_shadows/positional_shadow/soft_shadow_filter_quality=4
lights_and_shadows/positional_shadow/atlas_16_bits=false
global_illumination/voxel_gi/quality=1
textures/default_filters/anisotropic_filtering_level=0
anti_aliasing/quality/msaa_2d=1
anti_aliasing/quality/msaa_3d=1
anti_aliasing/quality/msaa_2d=2
anti_aliasing/quality/msaa_3d=2
environment/screen_space_reflection/roughness_quality=2
environment/subsurface_scattering/subsurface_scattering_quality=2
global_illumination/sdfgi/probe_ray_count=2
global_illumination/sdfgi/frames_to_update_lights=1
lights_and_shadows/tighter_shadow_caster_culling=false
anti_aliasing/quality/screen_space_aa=1
mesh_lod/lod_change/threshold_pixels=0.0
2d/snap/snap_2d_transforms_to_pixel=true
2d/snap/snap_2d_vertices_to_pixel=true
lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv=3
lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv=3
@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using Godot;
using System;
using Zennysoft.Ma.Adapter;
@@ -49,7 +50,14 @@ public class AttackComponent : IAttackComponent
public void RaiseMaximumAttack(int raiseAmount)
{
_maximumAttack.OnNext(raiseAmount);
_maximumAttack.OnNext(_maximumAttack.Value + raiseAmount);
Restore(raiseAmount);
}
public void LowerMaximumAttack(int lowerAmount)
{
_maximumAttack.OnNext(Mathf.Max(_maximumAttack.Value - lowerAmount, 1));
if (_currentAttack.Value > _maximumAttack.Value)
_currentAttack.OnNext(_maximumAttack.Value);
}
}
@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using Godot;
using System;
using Zennysoft.Ma.Adapter;
@@ -49,7 +50,14 @@ public class DefenseComponent : IDefenseComponent
public void RaiseMaximumDefense(int raiseAmount)
{
_maximumDefense.OnNext(raiseAmount);
_maximumDefense.OnNext(_maximumDefense.Value + raiseAmount);
Restore(raiseAmount);
}
public void LowerMaximumDefense(int lowerAmount)
{
_maximumDefense.OnNext(Mathf.Max(_maximumDefense.Value - lowerAmount, 1));
if (_currentDefense.Value > _maximumDefense.Value)
_currentDefense.OnNext(_maximumDefense.Value);
}
}
@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using Godot;
using System;
using Zennysoft.Ma.Adapter;
@@ -24,6 +25,8 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
public event Action PlayerLevelUp;
public event Action PlayerLevelDown;
public ExperiencePointsComponent()
{
var firstLevelExpRequirement = ExpToNextLevelCalculation(1);
@@ -45,20 +48,17 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
public void Gain(int baseExpGain)
{
var modifiedExpGain = baseExpGain * _expGainRate.Value;
var newCurrentExpTotal = modifiedExpGain + _currentExp.Value;
while (modifiedExpGain + _currentExp.Value >= _expToNextLevel.Value)
_currentExp.OnNext(Mathf.RoundToInt(modifiedExpGain + _currentExp.Value));
while (_currentExp.Value >= _expToNextLevel.Value)
LevelUp();
var cappedAmount = Math.Min(baseExpGain + _currentExp.Value, _expToNextLevel.Value);
_currentExp.OnNext(cappedAmount);
}
public void GainUnmodified(int flatRateExp)
{
var newCurrentExpTotal = flatRateExp + _currentExp.Value;
while (flatRateExp + _currentExp.Value >= _expToNextLevel.Value)
_currentExp.OnNext(newCurrentExpTotal);
while (_currentExp.Value >= _expToNextLevel.Value)
LevelUp();
var cappedAmount = Math.Min(flatRateExp + _currentExp.Value, _expToNextLevel.Value);
_currentExp.OnNext(cappedAmount);
}
public void ModifyExpGainRate(double newRate) => _expGainRate.OnNext(newRate);
@@ -73,6 +73,21 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
PlayerLevelUp?.Invoke();
}
public void LevelDown()
{
SfxDatabase.Instance.Play(SoundEffect.DecreaseStat);
_currentExp.OnNext(0);
if (_level.Value == 1)
return;
var newLevel = Mathf.Max(_level.Value - 1, 1);
_level.OnNext(newLevel);
var expToNextLevel = ExpToNextLevelCalculation(newLevel);
_expToNextLevel.OnNext(expToNextLevel);
PlayerLevelDown.Invoke();
}
private int ExpToNextLevelCalculation(int nextLevel)
{
return (int)(6.5 * nextLevel + 4.5 * Math.Pow(nextLevel, 2) + Math.Pow(nextLevel, 3));
@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using Godot;
using System;
using Zennysoft.Ma.Adapter;
@@ -77,4 +78,11 @@ public class HealthComponent : IHealthComponent
if (restoreHP)
Heal(raiseAmount);
}
public void LowerMaximumHP(int lowerAmount)
{
_maximumHP.OnNext(Mathf.Max(_maximumHP.Value - lowerAmount, 1));
if (_currentHP.Value > _maximumHP.Value)
_currentHP.OnNext(_maximumHP.Value);
}
}
@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using System;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -6,12 +7,14 @@ namespace Zennysoft.Game.Ma;
public class LuckComponent : ILuckComponent
{
public IAutoProp<int> Luck => _luck;
public int InitialLuck { get; }
private AutoProp<int> _luck;
private readonly AutoProp<int> _luck;
private readonly int _initialValue;
public LuckComponent(int initialLuck)
{
InitialLuck = initialLuck;
_luck = new AutoProp<int>(initialLuck);
_initialValue = initialLuck;
}
@@ -22,4 +25,6 @@ public class LuckComponent : ILuckComponent
}
public void IncreaseLuck(int value) => _luck.OnNext(_luck.Value + value);
public void DecreaseLuck(int value) => _luck.OnNext(Godot.Mathf.Max(_luck.Value - value, 0));
}
@@ -0,0 +1,20 @@
using Chickensoft.Collections;
public class StatusEffectComponent : IStatusEffectComponent
{
public StatusEffectComponent(double rustDuration)
{
RustDuration = rustDuration;
}
public double RustDuration { get; set; }
public AutoProp<bool> Rust { get; } = new AutoProp<bool>(false);
public bool ImmuneToRust { get; set; } = false;
public void Reset()
{
Rust.OnNext(false);
}
}
@@ -0,0 +1 @@
uid://chhmivq4bntxf
@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using Godot;
using System;
using Zennysoft.Ma.Adapter;
@@ -56,6 +57,13 @@ public class VTComponent : IVTComponent
Restore(raiseAmount);
}
public void LowerMaximumVT(int lowerAmount)
{
_maximumVT.OnNext(Mathf.Max(_maximumVT.Value - lowerAmount, 1));
if (_currentVT.Value > _maximumVT.Value)
_currentVT.OnNext(_maximumVT.Value);
}
public void SetMaximumVT(int vt)
{
_maximumVT.OnNext(vt);
+7 -10
View File
@@ -21,7 +21,7 @@ public partial class App : Node, IApp
public const string GAME_SCENE_PATH = "res://src/game/Game.tscn";
public const string ENEMY_VIEWER_PATH = "res://src/data_viewer/DataViewer.tscn";
public const string ENEMY_VIEWER_PATH = "res://src/enemy_viewer/EnemyViewer.tscn";
[Node] private MainMenu MainMenu { get; set; } = default!;
@@ -40,14 +40,14 @@ public partial class App : Node, IApp
private Godot.Collections.Array _progress;
private SimpleInjector.Container _container;
private DataViewer _dataViewer;
private EnemyViewer _dataViewer;
private bool _loadingGame = false;
private bool _loadingEnemyViewer = false;
private string _optionsSavePath = string.Empty;
private string _controllerSavePath = string.Empty;
private ISaveFileManager _saveFileManager;
private IGame _game;
private IDataViewer _enemyViewer;
private IEnemyViewer _enemyViewer;
private double _reportedProgress = 0;
@@ -173,7 +173,7 @@ public partial class App : Node, IApp
.Handle((in AppLogic.Output.EnemyViewerExited _) =>
{
LoadingScreen.HideLoadingScreen();
if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer)
if (_enemyViewer != null && _enemyViewer is EnemyViewer enemyViewer)
enemyViewer.CallDeferred(MethodName.QueueFree);
MainMenu.Show();
MainMenu.EnemyViewerButton.GrabFocus();
@@ -211,7 +211,7 @@ public partial class App : Node, IApp
private async void LoadEnemyViewer(string sceneName)
{
var scene = await LoadSceneInternal(sceneName);
_enemyViewer = scene as IDataViewer;
_enemyViewer = scene as IEnemyViewer;
CallDeferred(MethodName.AddChild, scene);
LoadingScreen.HideLoadingScreen();
}
@@ -219,6 +219,7 @@ public partial class App : Node, IApp
private async Task<Node> LoadSceneInternal(string sceneName)
{
LoadingScreen.ShowLoadingScreen();
MainMenu.Hide();
LoadingScreen.ProgressBar.Value = 0;
var sceneLoader = new SceneLoader();
CallDeferred(MethodName.AddChild, sceneLoader);
@@ -238,11 +239,7 @@ public partial class App : Node, IApp
OptionsMenu.GameTab.GrabFocus();
}
private async void OnGallery()
{
GalleryMenu.Show();
GalleryMenu.ItemButton1.GrabFocus();
}
private async void OnGallery() => GalleryMenu.Show();
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
+1 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://cagfc5ridmteu"]
[gd_scene load_steps=6 format=3 uid="uid://bkhaksn82ws6h"]
[ext_resource type="Script" uid="uid://d1f8blk5ucqvq" path="res://src/app/App.cs" id="1_rt73h"]
[ext_resource type="PackedScene" uid="uid://rfvnddfqufho" path="res://src/menu/MainMenu.tscn" id="2_1uiag"]
+38 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=3 uid="uid://brgi35xj3b4ud"]
[gd_scene load_steps=27 format=3 uid="uid://brgi35xj3b4ud"]
[ext_resource type="Script" uid="uid://cw100tox0ufsy" path="res://src/audio/SfxDatabase.cs" id="1_ojkqd"]
[ext_resource type="AudioStream" uid="uid://cye8wlqbx66h4" path="res://src/audio/sfx/player_heal.ogg" id="2_158j8"]
@@ -9,6 +9,7 @@
[ext_resource type="AudioStream" uid="uid://c817txm4tmup7" path="res://src/audio/sfx/PLAYER_EQUIP.ogg" id="7_sew62"]
[ext_resource type="AudioStream" uid="uid://qxi7qto7hhgk" path="res://src/audio/sfx/PLAYER_UNEQUIP.ogg" id="8_rf1la"]
[ext_resource type="AudioStream" uid="uid://doeefxilh0luj" path="res://src/audio/sfx/ITEM_SORT.ogg" id="9_l6w22"]
[ext_resource type="AudioStream" uid="uid://cyae4bt60m7p4" path="res://src/audio/sfx/item_plasma_sword.ogg" id="10_7th20"]
[ext_resource type="AudioStream" uid="uid://4mk4hlse81if" path="res://src/audio/sfx/player_losehealth.ogg" id="10_kac56"]
[ext_resource type="AudioStream" uid="uid://dwp3ep3jddvrr" path="res://src/audio/sfx/UI_SELECT.ogg" id="10_nerso"]
[ext_resource type="AudioStream" uid="uid://ilf2s8ct2stt" path="res://src/audio/sfx/PLAYER_slower_slash.ogg" id="10_vyvit"]
@@ -33,22 +34,26 @@ script = ExtResource("1_ojkqd")
[node name="OpenInventorySound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("5_p5cio")
bus = &"SFX"
[node name="MoveSound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("6_r16t0")
max_polyphony = 5
bus = &"SFX"
[node name="SelectSound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_nerso")
bus = &"SFX"
[node name="CancelSound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("11_rloay")
bus = &"SFX"
@@ -56,51 +61,67 @@ bus = &"SFX"
[node name="HealHPSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("2_158j8")
bus = &"SFX"
[node name="TakeDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_kac56")
bus = &"SFX"
[node name="HealVTSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("3_kac56")
bus = &"SFX"
[node name="WeaponQuickSlashSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("13_fa8i8")
bus = &"SFX"
[node name="WeaponPlasmaSword" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_7th20")
bus = &"SFX"
[node name="WeaponSlowSlashSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_vyvit")
bus = &"SFX"
[node name="CritSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("14_p5cio")
bus = &"SFX"
[node name="PickupItemSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("15_r16t0")
bus = &"SFX"
[node name="LevelUpSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("16_sew62")
bus = &"SFX"
[node name="EquipSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("7_sew62")
bus = &"SFX"
[node name="UnequipSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("8_rf1la")
bus = &"SFX"
@@ -108,50 +129,66 @@ bus = &"SFX"
[node name="TransferItemSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("18_l6w22")
bus = &"SFX"
[node name="IncreaseStatSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("4_fa8i8")
bus = &"SFX"
[node name="DecreaseStatSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("4_fa8i8")
bus = &"SFX"
[node name="SortSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("9_l6w22")
bus = &"SFX"
[node name="RecallEnemiesSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("19_nerso")
bus = &"SFX"
[node name="KillHalfEnemiesSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("20_rloay")
bus = &"SFX"
[node name="TeleportToRandomRoomSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("21_6hsck")
bus = &"SFX"
[node name="TeleportToExitSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("22_3wq6u")
bus = &"SFX"
[node name="AbsorbHPFromAllEnemiesSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("23_aaerj")
bus = &"SFX"
[node name="SwapHPAndVTSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("23_jdwj3")
bus = &"SFX"
[node name="TurnAllEnemiesIntoHealingItemsSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("24_jdwj3")
bus = &"SFX"
@@ -24,6 +24,7 @@ public partial class SfxDatabase : Node
{SoundEffect.TakeDamage, TakeDamageSound },
{SoundEffect.HealVT, HealVTSound },
{SoundEffect.IncreaseStat, IncreaseStatSound },
{SoundEffect.DecreaseStat, DecreaseStatSound },
{SoundEffect.Crit, CritSound },
{SoundEffect.PickupItem, PickupItemSound },
{SoundEffect.OpenInventory, OpenInventorySound },
@@ -43,6 +44,7 @@ public partial class SfxDatabase : Node
{SoundEffect.TurnAllEnemiesIntoHealingItems, TurnAllEnemiesIntoHealingItemsSound},
{SoundEffect.WeaponQuickSlash, WeaponQuickSlashSound },
{SoundEffect.WeaponSlowSlash, WeaponSlowSlashSound },
{SoundEffect.WeaponPlasmaSword, WeaponPlasmaSword },
};
}
@@ -50,8 +52,11 @@ public partial class SfxDatabase : Node
[Node] private AudioStreamPlayer TakeDamageSound { get; set; } = default!;
[Node] private AudioStreamPlayer HealVTSound { get; set; } = default!;
[Node] private AudioStreamPlayer IncreaseStatSound { get; set; } = default!;
[Node] private AudioStreamPlayer DecreaseStatSound { get; set; } = default!;
[Node] private AudioStreamPlayer WeaponQuickSlashSound { get; set; } = default!;
[Node] private AudioStreamPlayer WeaponSlowSlashSound { get; set; } = default!;
[Node] private AudioStreamPlayer WeaponPlasmaSword { get; set; } = default!;
[Node] private AudioStreamPlayer CritSound { get; set; } = default!;
[Node] private AudioStreamPlayer PickupItemSound { get; set; } = default!;
[Node] private AudioStreamPlayer OpenInventorySound { get; set; }
@@ -87,6 +92,7 @@ public enum SoundEffect
TakeDamage,
HealVT,
IncreaseStat,
DecreaseStat,
Crit,
PickupItem,
OpenInventory,
@@ -107,5 +113,6 @@ public enum SoundEffect
TurnAllEnemiesIntoHealingItems,
WeaponQuickSlash,
WeaponSlowSlash,
WeaponPlasmaSword
}
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cgk17d8erskht"
path="res://.godot/imported/amb_ocean.ogg-f4ee3d30caf9194f7881a02c6507d38a.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_ocean.ogg"
dest_files=["res://.godot/imported/amb_ocean.ogg-f4ee3d30caf9194f7881a02c6507d38a.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://didc6vnf5ftlg"]
[gd_scene load_steps=3 format=3 uid="uid://dqvlemme0iwa"]
[ext_resource type="Script" uid="uid://bb36q1wpe0tlw" path="res://src/camera/ShakeCamera.cs" id="1_ubmds"]
@@ -1,171 +0,0 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
using Zennysoft.Game.Abstractions;
namespace Zennysoft.Game.Ma;
public interface IDataViewer
{
}
[Meta(typeof(IAutoNode))]
public partial class DataViewer : Control, IDataViewer
{
public override void _Notification(int what) => this.Notify(what);
[Dependency]
public IAppRepo AppRepo => this.DependOn<IAppRepo>();
[Export]
public float _cameraSpeed = 0.01f;
[Node] public Node3D CameraPivot { get; set; } = default!;
[Node] public Camera3D Camera3D { get; set; } = default!;
[Node] public Node3D ModelPivot { get; set; } = default!;
#region UI
[Node] public RichTextLabel EnemyName { get; set; } = default!;
[Node] public RichTextLabel Description { get; set; } = default!;
[Node] public Label HPValue { get; set; } = default!;
[Node] public Label ATKValue { get; set; } = default!;
[Node] public Label DEFValue { get; set; } = default!;
[Node] public Label Drop1Value { get; set; } = default!;
[Node] public Label Drop2Value { get; set; } = default!;
[Node] public Label AffinityValue { get; set; } = default!;
[Node] public Label WeaknessValue { get; set; } = default!;
[Node] public Control EnemyInfo { get; set; } = default!;
[Node] public Button BackButton { get; set; } = default!;
#endregion
private EnemyModelView _currentModel;
private float _cameraStartingPoint = 0f;
private int _currentIndex = 0;
private List<EnemyModelView> _enemies;
public void OnReady()
{
BackButton.Pressed += BackButton_Pressed;
_enemies = [.. ModelPivot.GetChildren().Cast<EnemyModelView>()];
_currentModel = _enemies.First();
DisplayEnemy();
}
public void OnEnterTree()
{
GetTree().Paused = false;
}
public void OnExitTree()
{
GetTree().Paused = false;
BackButton.Pressed -= BackButton_Pressed;
}
private void BackButton_Pressed() => AppRepo.OnDataViewerExited();
public override void _Input(InputEvent @event)
{
if (BackButton.HasFocus() && @event.IsActionPressed(GameInputs.Interact))
{
GetTree().Paused = false;
BackButton.ReleaseFocus();
return;
}
if (_currentModel == null || BackButton.HasFocus())
return;
if (@event.IsActionPressed(GameInputs.Attack))
_currentModel.PlayPrimaryAttackAnimation();
if (@event.IsActionPressed(GameInputs.InventorySort))
_currentModel.PlaySecondaryAttackAnimation();
if (Input.IsActionJustPressed(GameInputs.Inventory))
_currentModel.PlayActivateAnimation();
if (@event.IsActionPressed(GameInputs.EnemyViewerWalk))
_currentModel.PlayWalkAnimation();
if (@event.IsActionReleased(GameInputs.EnemyViewerWalk))
_currentModel.PlayIdleAnimation();
if (@event.IsActionPressed(GameInputs.Interact))
{
GetTree().Paused = true;
BackButton.GrabFocus();
}
if (@event.IsActionPressed(GameInputs.StrafeRight))
{
// Load next model
_enemies[_currentIndex].Hide();
if (_currentIndex == _enemies.Count - 1)
_currentIndex = 0;
else
_currentIndex++;
DisplayEnemy();
}
if (@event.IsActionPressed(GameInputs.StrafeLeft))
{
_enemies[_currentIndex].Hide();
// Load previous model
if (_currentIndex == 0)
_currentIndex = _enemies.Count - 1;
else
_currentIndex--;
DisplayEnemy();
}
}
public override void _Process(double delta)
{
if (_currentModel == null || BackButton.HasFocus())
return;
var forwardStrength = Input.GetActionStrength(GameInputs.CameraForward);
Camera3D.Position = Camera3D.Position.MoveToward(CameraPivot.Position, _cameraSpeed * forwardStrength * (_cameraStartingPoint / 10));
var backStrength = Input.GetActionStrength(GameInputs.CameraBack);
Camera3D.Position = Camera3D.Position.MoveToward(CameraPivot.Position, -_cameraSpeed * backStrength * (_cameraStartingPoint / 10));
var leftStrength = Input.GetActionStrength(GameInputs.MoveLeft);
CameraPivot.RotateY(_cameraSpeed * leftStrength);
var rightStrength = Input.GetActionStrength(GameInputs.MoveRight);
CameraPivot.RotateY(-_cameraSpeed * rightStrength);
Camera3D.Position = Camera3D.Position.Clamp(new Vector3(0, 0, _cameraStartingPoint / 2), new Vector3(0, 0, _cameraStartingPoint));
ModelPivot.Rotation = ModelPivot.Rotation.Clamp(Mathf.DegToRad(-60), Mathf.DegToRad(60));
if (_currentModel is EnemyModelView2D enemyModelView2D)
enemyModelView2D.SetCurrentDirection(_currentModel.GlobalBasis, -CameraPivot.Basis.Z);
}
private void DisplayEnemy()
{
_currentModel = _enemies[_currentIndex];
var size = _currentModel.GetSize();
if (_currentModel is EnemyModelView2D)
_cameraStartingPoint = size.X / 50;
else
_cameraStartingPoint = size.X * 2;
Camera3D.Position = new Vector3(Camera3D.Position.X, Camera3D.Position.Y, _cameraStartingPoint);
EnemyName.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Name : "Placeholder Text";
Description.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Description : "Placeholder Text";
HPValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.MaximumHP : "Placeholder Text";
ATKValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.ATK : "Placeholder Text";
DEFValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.DEF : "Placeholder Text";
Drop1Value.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Drop1 : "Placeholder Text";
Drop2Value.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Drop2 : "Placeholder Text";
AffinityValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Affinity : "Placeholder Text";
WeaknessValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Weakness : "Placeholder Text";
_enemies[_currentIndex].Show();
}
}
@@ -1,312 +0,0 @@
[gd_scene load_steps=19 format=3 uid="uid://c7wjbgbrdivol"]
[ext_resource type="Script" uid="uid://bgaflnnur26vk" path="res://src/data_viewer/DataViewer.cs" id="1_1qako"]
[ext_resource type="Texture2D" uid="uid://dsf5l6g8n1tkw" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Viewer_720_16_9.png" id="2_hpkd1"]
[ext_resource type="Texture2D" uid="uid://bophm5or5opdf" path="res://src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg" id="3_hpkd1"]
[ext_resource type="PackedScene" uid="uid://bimjnsu52y3xi" path="res://src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn" id="3_vk1lh"]
[ext_resource type="Shader" uid="uid://o80s4yvp0rto" path="res://src/data_viewer/BlurSprite3D.gdshader" id="4_vk1lh"]
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="6_vk1lh"]
[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="7_dvixg"]
[ext_resource type="PackedScene" uid="uid://bjg8wyvp8q6oc" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="8_ekqja"]
[ext_resource type="PackedScene" uid="uid://c5xijwxkg4pf6" path="res://src/enemy/enemy_types/05. ballos/BallosModelView.tscn" id="11_icshd"]
[ext_resource type="PackedScene" uid="uid://bid6f48l0q58o" path="res://src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn" id="19_qagkd"]
[ext_resource type="PackedScene" uid="uid://dnomfbym36ivg" path="res://src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn" id="20_bw7jv"]
[ext_resource type="PackedScene" uid="uid://l4413jwn0m8v" path="res://src/enemy/enemy_types/16. demon wall/DemonWallModelView.tscn" id="21_i7aes"]
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="25_gdy4a"]
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="26_br3ej"]
[sub_resource type="Environment" id="Environment_vk1lh"]
[sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_dvixg"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dvixg"]
render_priority = 0
shader = ExtResource("4_vk1lh")
shader_parameter/iChannel0 = ExtResource("3_hpkd1")
shader_parameter/samples = 100
shader_parameter/alpha_cut = 0.0
shader_parameter/gain = 17.73
shader_parameter/blur_x = 50.0
shader_parameter/blur_y = 50.0
shader_parameter/Rot_Angle = 4.9
shader_parameter/Metal = 0.0
[sub_resource type="Environment" id="Environment_3wl4s"]
background_mode = 1
[node name="DataViewer" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_1qako")
_cameraSpeed = 0.08
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_hpkd1")
[node name="CenterContainer2" type="CenterContainer" parent="."]
layout_mode = 0
offset_left = 69.0
offset_top = 196.0
offset_right = 900.0
offset_bottom = 942.0
[node name="SubViewportContainer" type="SubViewportContainer" parent="CenterContainer2"]
custom_minimum_size = Vector2(750, 600)
layout_mode = 2
stretch = true
[node name="SubViewport" type="SubViewport" parent="CenterContainer2/SubViewportContainer"]
process_mode = 1
own_world_3d = true
handle_input_locally = false
size = Vector2i(750, 600)
render_target_update_mode = 4
[node name="Light" type="OmniLight3D" parent="CenterContainer2/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0.401216)
omni_range = 4096.0
[node name="ModelPivot" type="Node3D" parent="CenterContainer2/SubViewportContainer/SubViewport"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.82392, 0)
[node name="Sproingy" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("3_vk1lh")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.26108, 0)
visible = false
[node name="Michael" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("8_ekqja")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.20608, 0)
visible = false
[node name="Ballos" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("11_icshd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.23608, 0)
visible = false
[node name="Horse Face" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("19_qagkd")]
visible = false
[node name="Ox Face" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("20_bw7jv")]
visible = false
[node name="Demon Wall" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("21_i7aes")]
visible = false
[node name="CameraPivot" type="Node3D" parent="CenterContainer2/SubViewportContainer/SubViewport"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="Camera3D" type="Camera3D" parent="CenterContainer2/SubViewportContainer/SubViewport/CameraPivot"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5)
environment = SubResource("Environment_vk1lh")
attributes = SubResource("CameraAttributesPhysical_dvixg")
[node name="Sprite3D" type="Sprite3D" parent="CenterContainer2/SubViewportContainer/SubViewport/CameraPivot/Camera3D"]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 349.344, -203.088, -300)
material_override = SubResource("ShaderMaterial_dvixg")
pixel_size = 1.0
billboard = 2
transparent = false
texture_filter = 2
texture = ExtResource("3_hpkd1")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
anchor_left = 0.5
anchor_top = 0.186
anchor_right = 0.969
anchor_bottom = 0.87
offset_left = 13.0
offset_top = 4.12
offset_right = 5.5199
offset_bottom = 3.3999
theme_override_constants/margin_left = 25
theme_override_constants/margin_top = 25
theme_override_constants/margin_right = 25
[node name="EnemyInfo" type="VBoxContainer" parent="MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/separation = 20
[node name="EnemyName" type="RichTextLabel" parent="MarginContainer/EnemyInfo"]
unique_name_in_owner = true
custom_minimum_size = Vector2(800, 50)
layout_mode = 2
theme_override_fonts/normal_font = ExtResource("7_dvixg")
theme_override_font_sizes/normal_font_size = 40
text = "Placeholder Text"
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/EnemyInfo"]
custom_minimum_size = Vector2(0, 150)
layout_mode = 2
[node name="StatBlock" type="VBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
[node name="HPBlock" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/HPBlock"]
layout_mode = 2
text = "HP"
label_settings = ExtResource("6_vk1lh")
[node name="HPValue" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/HPBlock"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "992"
label_settings = ExtResource("6_vk1lh")
[node name="ATKBlock" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/ATKBlock"]
layout_mode = 2
text = "ATK"
label_settings = ExtResource("6_vk1lh")
[node name="ATKValue" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/ATKBlock"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "14"
label_settings = ExtResource("6_vk1lh")
[node name="DEFBlock" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/DEFBlock"]
layout_mode = 2
text = "DEF"
label_settings = ExtResource("6_vk1lh")
[node name="DEFValue" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/DEFBlock"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "15"
label_settings = ExtResource("6_vk1lh")
[node name="DropsBlock" type="VBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
[node name="Drops" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock"]
layout_mode = 2
text = "Drops:"
label_settings = ExtResource("6_vk1lh")
[node name="FirstDrop" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/FirstDrop"]
layout_mode = 2
text = "1."
label_settings = ExtResource("6_vk1lh")
[node name="Drop1Value" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/FirstDrop"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "???"
label_settings = ExtResource("6_vk1lh")
[node name="SecondDrop" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/SecondDrop"]
layout_mode = 2
text = "2."
label_settings = ExtResource("6_vk1lh")
[node name="Drop2Value" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/SecondDrop"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "Goddess Garb"
label_settings = ExtResource("6_vk1lh")
[node name="AffinityBlock" type="VBoxContainer" parent="MarginContainer/EnemyInfo"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
[node name="Affinity" type="HBoxContainer" parent="MarginContainer/EnemyInfo/AffinityBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Affinity"]
layout_mode = 2
text = "Affinity:"
label_settings = ExtResource("6_vk1lh")
[node name="AffinityValue" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Affinity"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "Metal"
label_settings = ExtResource("6_vk1lh")
[node name="Weakness" type="HBoxContainer" parent="MarginContainer/EnemyInfo/AffinityBlock"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Weakness"]
layout_mode = 2
text = "Weakness:"
label_settings = ExtResource("6_vk1lh")
[node name="WeaknessValue" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Weakness"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "Holy"
label_settings = ExtResource("6_vk1lh")
[node name="Description" type="RichTextLabel" parent="MarginContainer/EnemyInfo"]
unique_name_in_owner = true
custom_minimum_size = Vector2(800, 625)
layout_mode = 2
theme_override_fonts/normal_font = ExtResource("7_dvixg")
theme_override_font_sizes/normal_font_size = 30
text = "Placeholder Text"
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_3wl4s")
[node name="SpotLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -0.31977, 0.947495, 0, -0.947495, -0.31977, 0, 6.05742, -1.13242)
light_energy = 8.943
spot_range = 9.00889
spot_attenuation = 3.45
[node name="BackButton" type="Button" parent="."]
unique_name_in_owner = true
layout_mode = 0
offset_left = 1671.0
offset_top = 972.0
offset_right = 1803.0
offset_bottom = 1028.0
theme_override_styles/focus = ExtResource("25_gdy4a")
theme_override_styles/disabled_mirrored = ExtResource("26_br3ej")
theme_override_styles/disabled = ExtResource("26_br3ej")
theme_override_styles/hover_pressed_mirrored = ExtResource("26_br3ej")
theme_override_styles/hover_pressed = ExtResource("26_br3ej")
theme_override_styles/hover_mirrored = ExtResource("26_br3ej")
theme_override_styles/hover = ExtResource("26_br3ej")
theme_override_styles/pressed_mirrored = ExtResource("26_br3ej")
theme_override_styles/pressed = ExtResource("26_br3ej")
theme_override_styles/normal_mirrored = ExtResource("26_br3ej")
theme_override_styles/normal = ExtResource("26_br3ej")
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bophm5or5opdf"
path="res://.godot/imported/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg-c763a9fd7b565d1015c74205c4c551f8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg"
dest_files=["res://.godot/imported/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg-c763a9fd7b565d1015c74205c4c551f8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
@@ -25,13 +25,13 @@ public partial class DebugInfo : Control
_map.FloorLoaded += _map_FloorLoaded;
_gameRepo.EnemyDied += _gameRepo_EnemyDied;
_player.PlayerDied += _player_PlayerDied;
DeathCount.Text = _game.QuestData.DeathCount.ToString();
}
private void _gameRepo_EnemyDied(IEnemy obj) => EnemyCount.Text = (EnemyCount.Text.ToInt() - 1).ToString();
private void _map_FloorLoaded()
{
DeathCount.Text = _game.QuestData.DeathCount.ToString();
MapName.Text = _map.CurrentFloor.SceneFilePath.GetFile().TrimSuffix(".tscn");
EnemyCount.Text = _map.CurrentFloor.GetChild(0).GetChildren().OfType<IDungeonRoom>().Select(x => x.GetChildren().OfType<IEnemy>()).Count().ToString();
}
@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://t22s2y1t8ktc"]
[gd_scene load_steps=4 format=3 uid="uid://0eo47mewhlit"]
[ext_resource type="Script" uid="uid://c4g3frcpt0h36" path="res://src/debug_info/DebugInfo.cs" id="1_6tk84"]
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="1_i766g"]
+1 -1
View File
@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="DialogueResource" load_steps=2 format=3 uid="uid://dlbsw423e12au"]
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_resource.gd" id="1_p1wx7"]
[ext_resource type="Script" uid="uid://dbs4435dsf3ry" path="res://addons/dialogue_manager/dialogue_resource.gd" id="1_p1wx7"]
[resource]
script = ExtResource("1_p1wx7")
+2 -2
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://kt5fg0it26cf"]
[gd_scene load_steps=2 format=3 uid="uid://ci8272gtj7oj6"]
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_label.gd" id="1_bkcfu"]
[ext_resource type="Script" uid="uid://g32um0mltv5d" path="res://addons/dialogue_manager/dialogue_label.gd" id="1_bkcfu"]
[node name="Dialog" type="RichTextLabel"]
anchors_preset = 15
@@ -1,15 +1,5 @@
~ general
Hi...
=> END
~ introduction
I haven't had a script added yet.
=> END
~ hit
Yep, hitting me does work though.
=> END
~ get_item
ooo yum
=> END
@@ -1,4 +1,4 @@
[gd_scene load_steps=95 format=3 uid="uid://dpoonda2dwwic"]
[gd_scene load_steps=95 format=3 uid="uid://cygwsc1gebeut"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_53wuj"]
animation = &"idle_back"
+3 -8
View File
@@ -3,7 +3,6 @@ using Chickensoft.Introspection;
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -38,8 +37,6 @@ public partial class BossTypeA : Enemy, IHaveEngagePlayerBehavior, IHaveFollowBe
[Node] public Area3D PlayerDetector { get; set; } = default!;
[Node] public Label BossHP { get; set; } = default!;
private Vector3 _previousPosition = Vector3.Zero;
public void OnResolved()
@@ -60,8 +57,6 @@ public partial class BossTypeA : Enemy, IHaveEngagePlayerBehavior, IHaveFollowBe
_enemyLogic.Input(new EnemyLogic.Input.Move());
_previousPosition = GlobalPosition;
}
BossHP.Text = HealthComponent.CurrentHP.Value + "/" + HealthComponent.MaximumHP.Value;
}
public void OnPhysicsProcess(double delta)
@@ -79,9 +74,9 @@ public partial class BossTypeA : Enemy, IHaveEngagePlayerBehavior, IHaveFollowBe
protected void OnVelocityComputed(Vector3 safeVelocity)
{
Velocity = safeVelocity;
Velocity = new Vector3(safeVelocity.X, 0, safeVelocity.Z);
if (!Velocity.IsZeroApprox())
LookAtTarget(safeVelocity);
LookAtTarget(Velocity);
MoveAndSlide();
}
@@ -155,7 +150,7 @@ public partial class BossTypeA : Enemy, IHaveEngagePlayerBehavior, IHaveFollowBe
private float GetRotationAngle()
{
var target = new Vector3(_player.GlobalPosition.X, Position.Y, _player.GlobalPosition.Z);
var target = new Vector3(_player.GlobalPosition.X, GlobalPosition.Y, _player.GlobalPosition.Z);
_rotation.LookAt(target, Vector3.Up, true);
_rotation.RotateY(Rotation.Y);
return _rotation.Rotation.Y;
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://br6dlxj36fw5i"]
[gd_scene load_steps=2 format=3 uid="uid://bbc80e2421xlb"]
[sub_resource type="BoxShape3D" id="BoxShape3D_7056c"]
+52 -3
View File
@@ -34,6 +34,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
public IDefenseComponent DefenseComponent { get; private set; }
public IStatusEffectComponent StatusEffectComponent { get; private set; }
public virtual IEnemyModelView EnemyModelView { get; set; } = default!;
public Vector3 TargetPosition { get; private set; }
@@ -69,6 +71,9 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
[Node] private AudioStreamPlayer3D _dieSFX { get; set; } = default!;
[Node] private AudioStreamPlayer3D _aggroSFX { get; set; } = default!;
private Timer _rustTimer;
private Timer _rustDuration;
protected bool _activated = false;
private Vector3 _previousPosition = Vector3.Zero;
@@ -86,8 +91,22 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
HealthComponent.HealthReachedZero += Die;
HealthComponent.DamageTaken += TakeHit;
_rustTimer = new Timer();
_rustDuration = new Timer();
_rustTimer.WaitTime = 3;
_rustDuration.WaitTime = 30;
_rustTimer.Timeout += _rustTimer_Timeout;
_rustDuration.Timeout += _rustDuration_Timeout;
AddChild(_rustTimer);
AddChild(_rustDuration);
AttackComponent = new AttackComponent(InitialAttack);
DefenseComponent = new DefenseComponent(InitialDefense);
StatusEffectComponent = new StatusEffectComponent(30);
StatusEffectComponent.Rust.Changed += OnRusted;
EnemyBinding
.Handle((in EnemyLogic.Output.Activate _) =>
@@ -160,6 +179,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
public virtual void Die()
{
SetPhysicsProcess(false);
_rustDuration.Stop();
_rustTimer.Stop();
_enemyLogic.Input(new EnemyLogic.Input.Defeated());
_player.ExperiencePointsComponent.Gain(ExpGiven);
EnemyModelView.PlayDeathAnimation();
@@ -180,8 +201,11 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
{
_morphSFX.Play();
SetPhysicsProcess(false);
_enemyLogic.Input(new EnemyLogic.Input.Defeated());
Callable.From(QueueFree);
_player.ExperiencePointsComponent.Gain(ExpGiven);
EnemyModelView.PlayDeathAnimation();
var tweener = CreateTween();
tweener.TweenInterval(1.0f);
tweener.TweenCallback(Callable.From(QueueFree));
}
public IDungeonRoom GetCurrentRoom(ImmutableList<IDungeonRoom> roomList)
@@ -212,7 +236,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
var spawnPointsGodotCollection = new Godot.Collections.Array<Marker3D>(spawnPoints);
var randomSpawnPoint = spawnPointsGodotCollection.PickRandom();
GlobalPosition = new Vector3(randomSpawnPoint.GlobalPosition.X, 0, randomSpawnPoint.GlobalPosition.Y);
GlobalPosition = new Vector3(randomSpawnPoint.GlobalPosition.X, GlobalPosition.Y, randomSpawnPoint.GlobalPosition.Z);
ResetPhysicsInterpolation();
_previousPosition = GlobalPosition;
if (this is IHavePatrolBehavior patrolEnemy)
@@ -240,4 +265,28 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
{
_player.TakeDamage(new AttackData(AttackComponent.CurrentAttack.Value, ElementType.None));
}
private void OnRusted(bool rustStatus)
{
if (rustStatus)
{
_rustTimer.Start();
_rustDuration.Start();
}
else
{
_rustTimer.Stop();
}
}
private void _rustTimer_Timeout()
{
HealthComponent.Damage(3);
TakeHit();
}
private void _rustDuration_Timeout()
{
StatusEffectComponent.Rust.OnNext(false);
}
}
+9 -4
View File
@@ -21,11 +21,13 @@ public abstract partial class Enemy2D : Enemy
public void OnEnterTree()
{
LineOfSight.BodyEntered += LineOfSight_BodyEntered;
_previousPosition = GlobalPosition;
}
public override void _PhysicsProcess(double delta)
{
_enemyModelView.SetCurrentDirection(GlobalBasis, -_player.GlobalBasis.Z);
_previousPosition = GlobalPosition;
}
public override void _Process(double delta)
@@ -33,11 +35,10 @@ public abstract partial class Enemy2D : Enemy
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer || _enemyLogic.Value is EnemyLogic.State.Patrolling)
{
var velocity = (GlobalPosition - _previousPosition) / (float)delta;
if (velocity.Length() < 0.3f)
if (velocity.Length() < 0.15f)
_enemyLogic.Input(new EnemyLogic.Input.Idle());
else
_enemyLogic.Input(new EnemyLogic.Input.Move());
_previousPosition = GlobalPosition;
}
}
@@ -55,12 +56,16 @@ public abstract partial class Enemy2D : Enemy
protected void OnVelocityComputed(Vector3 safeVelocity)
{
Velocity = safeVelocity;
Velocity = new Vector3(safeVelocity.X, 0, safeVelocity.Z);
LookAtTarget(safeVelocity);
MoveAndSlide();
}
protected void EngagePlayerBehavior_TakeAction() => PerformAction();
protected void EngagePlayerBehavior_TakeAction()
{
if (_player.HealthComponent.CurrentHP.Value > 0)
PerformAction();
}
protected void EngagePlayerBehavior_AcquireTarget() => LookAt(new Vector3(_player.GlobalPosition.X, GlobalPosition.Y, _player.GlobalPosition.Z), Vector3.Up, true);
@@ -1,10 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://dbvr8ewajja6a"]
[gd_scene load_steps=4 format=3 uid="uid://dcj80fft8v6ww"]
[ext_resource type="Script" uid="uid://cp02ufnj6c7kg" path="res://src/enemy/EnemyDatabase.cs" id="1_ywy58"]
[ext_resource type="PackedScene" uid="uid://b0gwivt7cw7nd" path="res://src/enemy/enemy_types/02. michael/Michael.tscn" id="2_tja3j"]
[ext_resource type="PackedScene" uid="uid://bksq62muhk3h5" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.tscn" id="3_cpupr"]
[ext_resource type="PackedScene" uid="uid://xeuulxx1p702" path="res://src/enemy/enemy_types/02. michael/Michael.tscn" id="2_tja3j"]
[ext_resource type="PackedScene" uid="uid://ckow4bnkohxsj" path="res://src/enemy/enemy_types/04. sara/Sara.tscn" id="3_cpupr"]
[sub_resource type="Resource" id="Resource_fevii"]
metadata/__load_path__ = "res://src/enemy/EnemyDatabase.cs"
[node name="EnemyDatabase" type="Node"]
script = ExtResource("1_ywy58")
script = SubResource("Resource_fevii")
EnemyList = Array[PackedScene]([ExtResource("2_tja3j"), ExtResource("3_cpupr")])
SpawnRate = PackedFloat32Array(1, 1)
@@ -38,6 +38,9 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
public event EventHandler TeleportAnimationFinished;
[Export]
public double ViewerSize { get; set; } = 1f;
[Export]
public bool CanMove { get; set; } = false;
@@ -1,5 +1,7 @@
using Godot;
using System;
using System.Collections.Generic;
using Zennysoft.Ma.Adapter.Entity;
namespace Zennysoft.Game.Ma;
@@ -48,6 +50,45 @@ public static class EnemyTypeToEnemyConverter
}
}
public static EnemyType Convert(IEnemy enemy)
{
if (enemy is Sproingy)
return EnemyType.Sproingy;
if (enemy is Michael)
return EnemyType.Michael;
if (enemy is FilthEater)
return EnemyType.FilthEater;
if (enemy is Sara)
return EnemyType.Sara;
if (enemy is Ballos)
return EnemyType.Ballos;
if (enemy is Chariot)
return EnemyType.Chariot;
if (enemy is Chinthe)
return EnemyType.Chinthe;
if (enemy is Ambassador ambassador)
if (ambassador.Name == "Ambassador")
return EnemyType.AmbassadorGreen;
else if (ambassador.Name == "AmbassadorRed")
return EnemyType.AmbassadorRed;
else
return EnemyType.AmbassadorSteel;
if (enemy is AgniDemon)
return EnemyType.AgniDemon;
if (enemy is AqueousDemon)
return EnemyType.AqueousDemon;
if (enemy is EdenPillar)
return EnemyType.EdenPillar;
if (enemy is Palan)
return EnemyType.Palan;
if (enemy is ShieldOfHeaven)
return EnemyType.ShieldOfHeaven;
if (enemy is GoldSproingy)
return EnemyType.GoldSproingy;
throw new NotImplementedException("Cannot duplicate this type of enemy.");
}
private static Enemy InstantiateFromPath(string scenePath)
{
var enemyScene = GD.Load<PackedScene>(scenePath);
@@ -27,6 +27,8 @@ public interface IEnemyModelView : INode3D
public void PlayDeathAnimation();
public double ViewerSize { get; }
public AttackData AttackData { get; set; }
public event EventHandler HitPlayer;
@@ -1,9 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://p74f12fh5v0i"]
[gd_scene load_steps=2 format=3 uid="uid://ddvhuhttr5q0m"]
[ext_resource type="Script" uid="uid://vjb6sjktj6m0" path="res://src/enemy/PatrolComponent.cs" id="1_dhoym"]
[sub_resource type="Resource" id="Resource_g8n53"]
metadata/__load_path__ = "res://src/enemy/PatrolComponent.cs"
[node name="PatrolComponent" type="Node3D"]
script = ExtResource("1_dhoym")
script = SubResource("Resource_g8n53")
[node name="Navigation" type="Node3D" parent="."]
@@ -1,4 +1,4 @@
[gd_scene load_steps=171 format=3 uid="uid://diaxvpmwgl65u"]
[gd_scene load_steps=171 format=3 uid="uid://3ax3e5uce27d"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_53wuj"]
animation = &"idle_back"
@@ -98,3 +98,4 @@ states/left/position = Vector2(378, 179)
states/right/node = SubResource("AnimationNodeAnimation_8wbs7")
states/right/position = Vector2(701, 179)
transitions = ["Start", "forward", SubResource("AnimationNodeStateMachineTransition_ivy74"), "forward", "left", SubResource("AnimationNodeStateMachineTransition_x7uye"), "left", "forward", SubResource("AnimationNodeStateMachineTransition_djeua"), "forward", "back", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "back", "forward", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "left", "right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "right", "left", SubResource("AnimationNodeStateMachineTransition_jwlar"), "back", "left", SubResource("AnimationNodeStateMachineTransition_fdoul"), "left", "back", SubResource("AnimationNodeStateMachineTransition_kpotx"), "forward", "right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "right", "forward", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "right", "back", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "back", "right", SubResource("AnimationNodeStateMachineTransition_m7aft"), "forward", "End", SubResource("AnimationNodeStateMachineTransition_7of2s"), "left", "End", SubResource("AnimationNodeStateMachineTransition_uwb20"), "right", "End", SubResource("AnimationNodeStateMachineTransition_vnd8n"), "back", "End", SubResource("AnimationNodeStateMachineTransition_v0yrd")]
graph_offset = Vector2(-65, 84)
@@ -103,3 +103,4 @@ states/left/position = Vector2(378, 179)
states/right/node = SubResource("AnimationNodeAnimation_8wbs7")
states/right/position = Vector2(702, 179)
transitions = ["Start", "forward", SubResource("AnimationNodeStateMachineTransition_ivy74"), "forward", "left", SubResource("AnimationNodeStateMachineTransition_x7uye"), "left", "forward", SubResource("AnimationNodeStateMachineTransition_djeua"), "forward", "back", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "back", "forward", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "left", "right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "right", "left", SubResource("AnimationNodeStateMachineTransition_jwlar"), "back", "left", SubResource("AnimationNodeStateMachineTransition_fdoul"), "left", "back", SubResource("AnimationNodeStateMachineTransition_kpotx"), "forward", "right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "right", "forward", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "right", "back", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "back", "right", SubResource("AnimationNodeStateMachineTransition_m7aft"), "forward", "End", SubResource("AnimationNodeStateMachineTransition_ctux2"), "right", "End", SubResource("AnimationNodeStateMachineTransition_qlkux"), "back", "End", SubResource("AnimationNodeStateMachineTransition_rmn3u"), "left", "End", SubResource("AnimationNodeStateMachineTransition_do1qe")]
graph_offset = Vector2(6, 45)
@@ -23,7 +23,7 @@ public partial class EngagePlayerBehavior : Node, IEngagePlayerBehavior
{
_actionTimer = new Timer();
_acquireTargetTimer = new Timer() { WaitTime = _acquireTargetTime };
_actionTimer.WaitTime = RandomizeTimer(_minimumAttackTime, _maximumAttackTime);
_actionTimer.WaitTime = 0.8f;
_actionTimer.Timeout += OnAttackTimeout;
_acquireTargetTimer.Timeout += OnAcquireTargetTimeout;
AddChild(_actionTimer);
@@ -44,6 +44,7 @@ public partial class EngagePlayerBehavior : Node, IEngagePlayerBehavior
private void OnAttackTimeout()
{
_actionTimer.Stop();
_actionTimer.WaitTime = RandomizeTimer(_minimumAttackTime, _maximumAttackTime);
_actionTimer.Start();
EmitSignal(SignalName.TakeAction);
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://8bcme8ao4axa"]
[gd_scene load_steps=2 format=3 uid="uid://cmhem5xknjsvc"]
[ext_resource type="Script" uid="uid://bbe5nt3kpvk0f" path="res://src/enemy/behaviors/EngagePlayerBehavior.cs" id="1_7r6b3"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://g4cupevu280j"]
[gd_scene load_steps=2 format=3 uid="uid://dld534cmm5twd"]
[ext_resource type="Script" uid="uid://drur3hx4p4du4" path="res://src/enemy/behaviors/FleeBehavior.cs" id="1_cty3c"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://mqj4jju3870v"]
[gd_scene load_steps=2 format=3 uid="uid://cve5oouhowtff"]
[ext_resource type="Script" uid="uid://chfhmralfmwva" path="res://src/enemy/behaviors/FollowBehavior.cs" id="1_3rkk2"]
@@ -2,6 +2,7 @@
using Chickensoft.Introspection;
using Godot;
using Godot.Collections;
using System.Linq;
using Zennysoft.Game.Abstractions.Entity;
namespace Zennysoft.Game.Ma;
@@ -22,7 +23,6 @@ public partial class PatrolBehavior : Node3D, IBehavior
private Timer _patrolTimer { get; set; } = default!;
private NavigationAgent3D _navigationAgent;
private int _recursiveCounter = 0;
private Vector3 _homePosition;
public Vector3 HomePosition
@@ -82,16 +82,9 @@ public partial class PatrolBehavior : Node3D, IBehavior
rng.Randomize();
var randomPointX = rng.RandfRange(-_patrolRange, _patrolRange);
var randomPointZ = rng.RandfRange(-_patrolRange, _patrolRange);
_navigationAgent.TargetPosition = HomePosition + new Vector3(randomPointX, 0, randomPointZ);
if (!_navigationAgent.IsTargetReachable())
{
_recursiveCounter++;
if (_recursiveCounter <= 100)
SetPatrolTarget();
else
_navigationAgent.TargetPosition = HomePosition;
}
_recursiveCounter = 0;
var patrolPoint = HomePosition + new Vector3(randomPointX, 0, randomPointZ);
var rid = NavigationServer3D.GetMaps().Single();
_navigationAgent.TargetPosition = NavigationServer3D.MapGetClosestPoint(rid, patrolPoint);
}
private void PatrolTimer_Timeout() => SetPatrolTarget();
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://2nkvacxsd46b"]
[gd_scene load_steps=2 format=3 uid="uid://cn4fv2gv6raql"]
[ext_resource type="Script" uid="uid://hpb1f5r17k5y" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"]
@@ -1,10 +1,10 @@
[gd_scene load_steps=16 format=3 uid="uid://bs56ccgosmu47"]
[gd_scene load_steps=16 format=3 uid="uid://crsy7gygjy317"]
[ext_resource type="Script" uid="uid://cq6b4ma3sy1en" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.cs" id="1_xsluo"]
[ext_resource type="PackedScene" uid="uid://2nkvacxsd46b" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="4_drfkj"]
[ext_resource type="PackedScene" uid="uid://bimjnsu52y3xi" path="res://src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn" id="4_o3b7p"]
[ext_resource type="PackedScene" uid="uid://8bcme8ao4axa" path="res://src/enemy/behaviors/EngagePlayerBehavior.tscn" id="5_drfkj"]
[ext_resource type="PackedScene" uid="uid://mqj4jju3870v" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_moun4"]
[ext_resource type="PackedScene" uid="uid://cn4fv2gv6raql" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="4_drfkj"]
[ext_resource type="PackedScene" uid="uid://bjcqrhtifpcvr" path="res://src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn" id="4_o3b7p"]
[ext_resource type="PackedScene" uid="uid://cmhem5xknjsvc" path="res://src/enemy/behaviors/EngagePlayerBehavior.tscn" id="5_drfkj"]
[ext_resource type="PackedScene" uid="uid://cve5oouhowtff" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_moun4"]
[ext_resource type="AudioStream" uid="uid://ba8xendacec6" path="res://src/audio/sfx/item_kyuu_layer_2.ogg" id="6_ungov"]
[ext_resource type="AudioStream" uid="uid://b7ycb6qvitpmw" path="res://src/audio/sfx/player_HITENEMY_3.ogg" id="7_ungov"]
[ext_resource type="AudioStream" uid="uid://bf7adfdd857hw" path="res://src/audio/sfx/enemy_morph.ogg" id="8_agkuf"]
@@ -32,7 +32,7 @@ top_radius = 0.0
[sub_resource type="CylinderShape3D" id="CylinderShape3D_drfkj"]
radius = 1.0
[node name="Sproingy" type="CharacterBody3D"]
[node name="Sproingy" type="CharacterBody3D" groups=["enemy"]]
process_mode = 1
collision_layer = 10
axis_lock_linear_y = true
@@ -84,7 +84,6 @@ collision_mask = 34
shape = SubResource("CylinderShape3D_drfkj")
[node name="Visual" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.975554, 0)
[node name="EnemyModelView" parent="Visual" instance=ExtResource("4_o3b7p")]
unique_name_in_owner = true
@@ -101,14 +100,13 @@ _followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("5_drfkj")]
unique_name_in_owner = true
_minimumAttackTime = 1.0
_maximumAttackTime = 3.0
_maximumAttackTime = 4.0
_acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true
avoidance_enabled = true
radius = 1.0
radius = 3.0
[node name="SFX" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
@@ -6,4 +6,11 @@
script = ExtResource("1_1ncna")
Name = "Sproingy"
Description = "A guy who likes to have fun."
MaximumHP = ""
ATK = ""
DEF = ""
Affinity = ""
Weakness = ""
Drop1 = ""
Drop2 = ""
metadata/_custom_type_script = ExtResource("1_1ncna")
@@ -1,4 +1,4 @@
[gd_scene load_steps=80 format=3 uid="uid://bimjnsu52y3xi"]
[gd_scene load_steps=80 format=3 uid="uid://bjcqrhtifpcvr"]
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_oh25a"]
[ext_resource type="Texture2D" uid="uid://dd0ia6isdqg61" path="res://src/enemy/enemy_types/01. sproingy/animations/ATTACK/Layer 1.png" id="1_pbx41"]
@@ -666,7 +666,7 @@ EnemyLoreInfo = SubResource("Resource_ivy74")
[node name="Sprite3D" type="Sprite3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 1.1044, 0)
transform = Transform3D(6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 2.05501, 0)
pixel_size = 0.001
billboard = 2
shaded = true
@@ -697,7 +697,7 @@ animation = &"idle_left_walk"
[node name="Hitbox" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.152949, 1.1044, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.152949, 2.05501, 0)
collision_layer = 64
collision_mask = 64
@@ -722,12 +722,12 @@ anim_player = NodePath("../AnimationPlayer")
[node name="WalkSFX" type="AudioStreamPlayer3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1044, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.05501, 0)
autoplay = true
bus = &"SFX"
[node name="Shadow" type="Sprite3D" parent="."]
transform = Transform3D(0.115, 0, 0, 0, -5.02681e-09, 0.115, 0, -0.115, -5.02681e-09, -0.00018537, -0.942894, 0.0453106)
transform = Transform3D(0.115, 0, 0, 0, -5.02681e-09, 0.115, 0, -0.115, -5.02681e-09, -0.00018537, 0.00771421, 0.0453106)
transparency = 0.1
cast_shadow = 0
texture_filter = 0
@@ -19,33 +19,33 @@ public partial class Michael : Enemy2D, IHavePatrolBehavior, IHaveEngagePlayerBe
public void OnReady()
{
FollowBehavior.Init(NavigationAgent);
PatrolBehavior.Init(NavigationAgent);
PatrolBehavior.HomePosition = GlobalPosition;
PatrolBehavior.OnVelocityComputed += OnVelocityComputed;
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
SetPhysicsProcess(true);
FollowBehavior.Init(NavigationAgent);
PatrolBehavior.Init(NavigationAgent);
PatrolBehavior.HomePosition = GlobalPosition;
PatrolBehavior.OnVelocityComputed += OnVelocityComputed;
FollowBehavior.OnVelocityComputed += OnVelocityComputed;
EngagePlayerBehavior.TakeAction += EngagePlayerBehavior_TakeAction;
EngagePlayerBehavior.AcquireTarget += EngagePlayerBehavior_AcquireTarget;
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
PlayerDetector.BodyExited += PlayerDetector_BodyExited;
SetPhysicsProcess(true);
}
public void OnResolved()
{
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
}
public override void Move() => EnemyModelView.PlayIdleAnimation();
public new void OnExitTree()
{
base.OnExitTree();
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
FollowBehavior.OnVelocityComputed -= OnVelocityComputed;
EngagePlayerBehavior.TakeAction -= EngagePlayerBehavior_TakeAction;
EngagePlayerBehavior.AcquireTarget -= EngagePlayerBehavior_AcquireTarget;
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
base.OnExitTree();
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
FollowBehavior.OnVelocityComputed -= OnVelocityComputed;
EngagePlayerBehavior.TakeAction -= EngagePlayerBehavior_TakeAction;
EngagePlayerBehavior.AcquireTarget -= EngagePlayerBehavior_AcquireTarget;
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
}
}
@@ -1,12 +1,12 @@
[gd_scene load_steps=14 format=3 uid="uid://b0gwivt7cw7nd"]
[gd_scene load_steps=14 format=3 uid="uid://xeuulxx1p702"]
[ext_resource type="Script" uid="uid://c4pdledq3bll3" path="res://src/enemy/enemy_types/02. michael/Michael.cs" id="1_lb5oy"]
[ext_resource type="PackedScene" uid="uid://bjg8wyvp8q6oc" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="3_wrps7"]
[ext_resource type="PackedScene" uid="uid://2nkvacxsd46b" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="5_fkx5j"]
[ext_resource type="PackedScene" uid="uid://mqj4jju3870v" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_bun8r"]
[ext_resource type="PackedScene" uid="uid://uqle8gaeajg6" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="3_wrps7"]
[ext_resource type="PackedScene" uid="uid://cn4fv2gv6raql" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="5_fkx5j"]
[ext_resource type="PackedScene" uid="uid://cve5oouhowtff" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_bun8r"]
[ext_resource type="AudioStream" uid="uid://ba8xendacec6" path="res://src/audio/sfx/item_kyuu_layer_2.ogg" id="6_x8mrp"]
[ext_resource type="AudioStream" uid="uid://b7ycb6qvitpmw" path="res://src/audio/sfx/player_HITENEMY_3.ogg" id="7_kwkfv"]
[ext_resource type="PackedScene" uid="uid://8bcme8ao4axa" path="res://src/enemy/behaviors/EngagePlayerBehavior.tscn" id="7_x8mrp"]
[ext_resource type="PackedScene" uid="uid://cmhem5xknjsvc" path="res://src/enemy/behaviors/EngagePlayerBehavior.tscn" id="7_x8mrp"]
[ext_resource type="AudioStream" uid="uid://bf7adfdd857hw" path="res://src/audio/sfx/enemy_morph.ogg" id="8_upf7y"]
[ext_resource type="AudioStream" uid="uid://bn6ns3jxkw03b" path="res://src/audio/sfx/ENEMY_SPROING_death.ogg" id="9_fm627"]
@@ -15,15 +15,16 @@ height = 5.0
radius = 1.0
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_0h5s2"]
radius = 0.34933
height = 2.66932
[sub_resource type="CylinderShape3D" id="CylinderShape3D_eek1b"]
radius = 1.0
[sub_resource type="SphereShape3D" id="SphereShape3D_wrps7"]
radius = 1.0
radius = 0.552847
[node name="Michael" type="CharacterBody3D"]
[node name="Michael" type="CharacterBody3D" groups=["enemy"]]
process_mode = 1
collision_layer = 10
collision_mask = 11
@@ -32,6 +33,13 @@ axis_lock_angular_x = true
axis_lock_angular_z = true
motion_mode = 1
script = ExtResource("1_lb5oy")
AeolicResistance = -20.0
HydricResistance = -20.0
IgenousResistance = -20.0
FerrumResistance = -20.0
TelluricResistance = -20.0
HolyResistance = -20.0
CurseResistance = -20.0
[node name="LineOfSight" type="Area3D" parent="."]
unique_name_in_owner = true
@@ -57,7 +65,7 @@ shape = SubResource("CapsuleShape3D_0h5s2")
[node name="EnemyModelView" parent="." instance=ExtResource("3_wrps7")]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0799522, 0.805832, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.08, 0, 0)
[node name="PlayerDetector" type="Area3D" parent="."]
unique_name_in_owner = true
@@ -82,6 +90,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71715, 0)
[node name="PatrolBehavior" parent="Components" instance=ExtResource("5_fkx5j")]
unique_name_in_owner = true
_patrolSpeed = 60.0
_patrolRange = 15.0
_patrolTime = 20.0
[node name="FollowBehavior" parent="Components" instance=ExtResource("6_bun8r")]
unique_name_in_owner = true
@@ -96,7 +107,7 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true
avoidance_enabled = true
radius = 1.0
radius = 3.0
[node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71715, 0)
@@ -1,9 +1,16 @@
[gd_resource type="Resource" script_class="EnemyLoreInfo" load_steps=2 format=3 uid="uid://6d7ivtna8dqb"]
[ext_resource type="Script" path="res://src/enemy/EnemyLoreInfo.cs" id="1_xsclu"]
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="1_xsclu"]
[resource]
script = ExtResource("1_xsclu")
Name = "Michael"
Description = "This one doesn't like fun at all."
MaximumHP = ""
ATK = ""
DEF = ""
Affinity = ""
Weakness = ""
Drop1 = ""
Drop2 = ""
metadata/_custom_type_script = ExtResource("1_xsclu")
@@ -0,0 +1,9 @@
[gd_resource type="VisualShader" format=3 uid="uid://dkpdbgolur736"]
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
"
@@ -1,4 +1,4 @@
[gd_scene load_steps=142 format=3 uid="uid://bjg8wyvp8q6oc"]
[gd_scene load_steps=142 format=3 uid="uid://uqle8gaeajg6"]
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_o4cc2"]
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_3eot4"]
@@ -71,7 +71,7 @@
[ext_resource type="Texture2D" uid="uid://vxphbifafq0q" path="res://src/enemy/enemy_types/02. michael/animations/IDLE_WALK/LEFT SIDE/Michael_IdleWalk_Left (21).png" id="68_msiau"]
[ext_resource type="Texture2D" uid="uid://7r30bjydumon" path="res://src/enemy/enemy_types/02. michael/animations/IDLE_WALK/LEFT SIDE/Michael_IdleWalk_Left (22).png" id="69_lec8c"]
[ext_resource type="Texture2D" uid="uid://djspx2smexhme" path="res://src/enemy/enemy_types/02. michael/animations/IDLE_WALK/LEFT SIDE/Michael_IdleWalk_Left (23).png" id="70_f0jo7"]
[ext_resource type="PackedScene" uid="uid://dpoonda2dwwic" path="res://src/enemy/BasicEnemyAnimationTree.tscn" id="73_gby04"]
[ext_resource type="PackedScene" uid="uid://cygwsc1gebeut" path="res://src/enemy/BasicEnemyAnimationTree.tscn" id="73_gby04"]
[ext_resource type="AnimationNodeStateMachine" uid="uid://cbq8xog50cjjy" path="res://src/enemy/animation_state_machines/PrimaryAttackStateMachine.tres" id="74_fxhv6"]
[ext_resource type="Texture2D" uid="uid://duygq1qfer5oa" path="res://src/vfx/Enemy/michael_attack.png" id="74_mip6u"]
[ext_resource type="AnimationNodeStateMachine" uid="uid://co7lshemjrro8" path="res://src/enemy/animation_state_machines/IdleStateMachine.tres" id="74_pxi1p"]
@@ -1187,7 +1187,7 @@ EnemyLoreInfo = SubResource("Resource_gby04")
[node name="Sprite3D" type="Sprite3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.25389, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.98924, 0)
billboard = 2
shaded = true
alpha_cut = 1
@@ -1245,19 +1245,19 @@ libraries = {
}
[node name="Michael Attack VFX" type="AnimatedSprite3D" parent="."]
transform = Transform3D(0.72, 0, 0, 0, 0.72, 0, 0, 0, 0.72, -0.129818, 1.61521, 0.532815)
transform = Transform3D(0.72, 0, 0, 0, 0.72, 0, 0, 0, 0.72, -0.129818, 2.35056, 0.532815)
modulate = Color(0.977, 0.31, 1, 0.741176)
billboard = 2
sprite_frames = SubResource("SpriteFrames_suy1t")
[node name="WalkSFX" type="AudioStreamPlayer3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.34076, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.07611, 0)
autoplay = true
bus = &"SFX"
[node name="Shadow" type="Sprite3D" parent="."]
transform = Transform3D(0.38, 0, 0, 0, -1.66103e-08, 0.38, 0, -0.38, -1.66103e-08, 0.00393164, -0.728023, 0.0077811)
transform = Transform3D(0.38, 0, 0, 0, -1.66103e-08, 0.38, 0, -0.38, -1.66103e-08, 0.00393164, 0.0073306, 0.0077811)
transparency = 0.1
cast_shadow = 0
modulate = Color(1, 1, 1, 0.591)
@@ -1,9 +1,6 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Zennysoft.Game.Ma;
@@ -45,10 +42,11 @@ public partial class FilthEater : Enemy2D, IHavePatrolBehavior, IHaveEngagePlaye
public override void PerformAction()
{
var rng = new RandomNumberGenerator();
var options = new List<Action>() { EnemyModelView.PlayPrimaryAttackAnimation, EnemyModelView.PlaySecondaryAttackAnimation };
var selection = rng.RandWeighted([PrimaryAttackChance, SecondaryAttackChance]);
options[(int)selection].Invoke();
var enemyPosition = new Vector3(GlobalPosition.X, _player.GlobalPosition.Y, GlobalPosition.Z);
if (enemyPosition.DistanceTo(_player.GlobalPosition) > 3)
EnemyModelView.PlaySecondaryAttackAnimation();
else
EnemyModelView.PlayPrimaryAttackAnimation();
}
public override void _ExitTree()
@@ -1,11 +1,11 @@
[gd_scene load_steps=16 format=3 uid="uid://cvk007twac22c"]
[gd_scene load_steps=16 format=3 uid="uid://bl426uws0i86l"]
[ext_resource type="Script" uid="uid://cohal8w5ceneg" path="res://src/enemy/enemy_types/03. filth_eater/FilthEater.cs" id="1_p438s"]
[ext_resource type="PackedScene" uid="uid://bup8c4x1na3aw" path="res://src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn" id="3_rrwed"]
[ext_resource type="PackedScene" uid="uid://b6sa6ntu4rbrm" path="res://src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn" id="3_rrwed"]
[ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="4_5eid5"]
[ext_resource type="PackedScene" uid="uid://2nkvacxsd46b" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="5_pvjvo"]
[ext_resource type="PackedScene" uid="uid://mqj4jju3870v" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_fccr3"]
[ext_resource type="PackedScene" uid="uid://8bcme8ao4axa" path="res://src/enemy/behaviors/EngagePlayerBehavior.tscn" id="7_8l567"]
[ext_resource type="PackedScene" uid="uid://cn4fv2gv6raql" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="5_pvjvo"]
[ext_resource type="PackedScene" uid="uid://cve5oouhowtff" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_fccr3"]
[ext_resource type="PackedScene" uid="uid://cmhem5xknjsvc" path="res://src/enemy/behaviors/EngagePlayerBehavior.tscn" id="7_8l567"]
[ext_resource type="AudioStream" uid="uid://ba8xendacec6" path="res://src/audio/sfx/item_kyuu_layer_2.ogg" id="7_qbmfg"]
[ext_resource type="AudioStream" uid="uid://b7ycb6qvitpmw" path="res://src/audio/sfx/player_HITENEMY_3.ogg" id="8_m7220"]
[ext_resource type="AudioStream" uid="uid://bf7adfdd857hw" path="res://src/audio/sfx/enemy_morph.ogg" id="9_g602r"]
@@ -16,10 +16,11 @@ height = 5.0
radius = 1.0
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
radius = 1.0
radius = 2.54294
height = 5.08589
[sub_resource type="SphereShape3D" id="SphereShape3D_0y048"]
radius = 1.0
radius = 2.30121
[sub_resource type="Resource" id="Resource_fv5vf"]
script = ExtResource("4_5eid5")
@@ -35,10 +36,10 @@ Drop2 = ""
metadata/_custom_type_script = ExtResource("4_5eid5")
[sub_resource type="CylinderShape3D" id="CylinderShape3D_qbmfg"]
height = 1.5
radius = 2.0
height = 5.81738
radius = 3.91016
[node name="FilthEater" type="CharacterBody3D"]
[node name="FilthEater" type="CharacterBody3D" groups=["enemy"]]
process_mode = 1
collision_layer = 10
collision_mask = 11
@@ -48,7 +49,7 @@ script = ExtResource("1_p438s")
[node name="LineOfSight" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.56859, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.25757, 0)
collision_layer = 2
collision_mask = 2
@@ -58,17 +59,17 @@ shape = SubResource("CylinderShape3D_jbgmx")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.56859, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.25757, 0)
shape = SubResource("CapsuleShape3D_cwfph")
[node name="Raycast" type="RayCast3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.31086, 0)
target_position = Vector3(0, 0, -5)
collision_mask = 3
[node name="Collision" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25757, 0)
collision_layer = 2048
collision_mask = 0
@@ -78,21 +79,21 @@ shape = SubResource("SphereShape3D_0y048")
[node name="EnemyModelView" parent="." instance=ExtResource("3_rrwed")]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.06859, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.114099, 0)
EnemyLoreInfo = SubResource("Resource_fv5vf")
[node name="PlayerDetector" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25757, 0)
collision_layer = 0
collision_mask = 34
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.179932, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.2771, 0)
shape = SubResource("CylinderShape3D_qbmfg")
[node name="Components" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25757, 0)
[node name="PatrolBehavior" parent="Components" instance=ExtResource("5_pvjvo")]
unique_name_in_owner = true
@@ -108,10 +109,11 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true
avoidance_enabled = true
radius = 1.0
height = 2.0
radius = 3.0
[node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25757, 0)
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
unique_name_in_owner = true

Some files were not shown because too many files have changed in this diff Show More