diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/Arrow.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/Arrow.cs index d90c7f7..3f1ad52 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/normal/Arrow.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/Arrow.cs @@ -16,7 +16,6 @@ SetEnableMovement(true); EnableVerticalMotion = false; DefaultLayer = RoomLayerEnum.NormalLayer; - Debug.Log("IsFallOver: ", IsFallOver, ", ", CollisionLayer); } public override CheckInteractiveResult CheckInteractive(ActivityObject master) @@ -132,6 +131,7 @@ Reparent(target); AnimatedSprite.Play(AnimatorNames.HalfEnd); HalfSprite.Visible = true; + RefreshBulletColor(false); EnableVerticalMotion = false; } diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs index 9acf91f..02be8c1 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs @@ -313,7 +313,8 @@ //距离太大, 自动销毁 if (MoveController.Enable) { - CurrFlyDistance += Velocity.Length() * delta; + //CurrFlyDistance += Velocity.Length() * delta; + CurrFlyDistance += BulletData.FlySpeed * delta; if (CurrFlyDistance >= BulletData.MaxDistance) { State = BulletStateEnum.MaxDistance; diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index 7792dc1..009ebe0 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -962,6 +962,10 @@ /// public bool IsEnemyWithPlayer() { + if (Player.Current == null) + { + return false; + } return CollisionWithMask(Player.Current.EnemyLayer); } diff --git a/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs b/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs index 9898284..71f69ec 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs @@ -31,6 +31,17 @@ { base.Process(delta); _activeArrow.ShadowOffset = ShadowOffset + new Vector2(0, Altitude); + _activeArrow.Visible = !IsTotalAmmoEmpty(); + } + + protected override void OnPickUp(Role master) + { + _activeArrow.RefreshBulletColor(master.IsEnemyWithPlayer()); + } + + protected override void OnRemove(Role master) + { + _activeArrow.RefreshBulletColor(false); } protected override void OnBeginCharge()