Basic projectile implementation
This commit is contained in:
@@ -123,6 +123,7 @@ namespace GameJamDungeon
|
||||
var attackSpeed = PlayerData.Inventory.EquippedWeapon.Value.WeaponStats.AttackSpeed;
|
||||
AnimationPlayer.SetSpeedScale((float)attackSpeed);
|
||||
AnimationPlayer.Play("attack");
|
||||
SwordSlashAnimation.Play("attack");
|
||||
})
|
||||
.Handle((in PlayerLogic.Output.ThrowItem output) =>
|
||||
{
|
||||
@@ -131,7 +132,6 @@ namespace GameJamDungeon
|
||||
this.Provide();
|
||||
PlayerLogic.Start();
|
||||
GameRepo.SetPlayerData(PlayerData);
|
||||
SwordSlashAnimation.Position = GetViewport().GetVisibleRect().Size / 2;
|
||||
GlobalPosition = GameRepo.PlayerGlobalPosition.Value;
|
||||
GameRepo.PlayerGlobalPosition.Sync += PlayerGlobalPosition_Sync;
|
||||
HealthTimer.Timeout += OnHealthTimerTimeout;
|
||||
@@ -177,6 +177,7 @@ namespace GameJamDungeon
|
||||
{
|
||||
PlayerLogic.Input(new PlayerLogic.Input.PhysicsTick(delta));
|
||||
|
||||
SwordSlashAnimation.Position = GetViewport().GetVisibleRect().Size / 2;
|
||||
MoveAndSlide();
|
||||
|
||||
PlayerLogic.Input(new PlayerLogic.Input.Moved(GlobalPosition, GlobalTransform));
|
||||
|
||||
Reference in New Issue
Block a user