Browse Source

perf: 🔥 delete the bullet of Ram

tags/0.1.0
shangfengh 3 years ago
parent
commit
a3347ea342
5 changed files with 32 additions and 34 deletions
  1. +25
    -27
      logic/GameClass/GameObj/Bullet/Bullet.Student.cs
  2. +2
    -2
      logic/Gaming/AttackManager.cs
  3. +3
    -3
      logic/Gaming/SkillManager/SkillManager.ActiveSkill.cs
  4. +1
    -1
      logic/Preparation/Utility/EnumType.cs
  5. +1
    -1
      logic/Preparation/Utility/GameData.cs

+ 25
- 27
logic/GameClass/GameObj/Bullet/Bullet.Student.cs View File

@@ -1,34 +1,32 @@
using Preparation.Interface;
using Preparation.Utility;
using System;
using Preparation.Utility;

namespace GameClass.GameObj
{
internal sealed class Ram : Bullet
{
public Ram(Character player, PlaceType placeType, XY pos, int radius = GameData.bulletRadius) :
base(player, radius, placeType, pos)
/* internal sealed class Ram : Bullet
{
}
public override double BulletBombRange => 0;
public override double BulletAttackRange => 0;
public override int AP => 7220;
public override int Speed => 0;
public override bool IsToBomb => false;
public override int CastTime => 0;
public override int Backswing => 0;
public override int RecoveryFromHit => 0;
public override bool CanAttack(GameObj target)
{
return false;
}
public override bool CanBeBombed(GameObjType gameObjType)
{
if (gameObjType == GameObjType.Character) return true;
return false;
}
public Ram(Character player, PlaceType placeType, XY pos, int radius = GameData.bulletRadius) :
base(player, radius, placeType, pos)
{
}
public override double BulletBombRange => 0;
public override double BulletAttackRange => 0;
public override int AP => 7220;
public override int Speed => 0;
public override bool IsToBomb => false;
public override int CastTime => 0;
public override int Backswing => 0;
public override int RecoveryFromHit => 0;
public override bool CanAttack(GameObj target)
{
return false;
}
public override bool CanBeBombed(GameObjType gameObjType)
{
// if (gameObjType == GameObjType.Character) return true;
return false;
}

public override BulletType TypeOfBullet => BulletType.Ram;
public override BulletType TypeOfBullet => BulletType.Ram;

}
}*/
}

+ 2
- 2
logic/Gaming/AttackManager.cs View File

@@ -159,8 +159,8 @@ namespace Gaming
{
BeAddictedToGame((Student)objBeingShot);
}
if (((Character)objBeingShot).IsGhost() && !bullet.Parent.IsGhost() && bullet.TypeOfBullet == BulletType.Ram)
BeStunned((Character)objBeingShot, bullet.AP);
// if (((Character)objBeingShot).IsGhost() && !bullet.Parent.IsGhost() && bullet.TypeOfBullet == BulletType.Ram)
// BeStunned((Character)objBeingShot, bullet.AP);
break;
default:
break;


+ 3
- 3
logic/Gaming/SkillManager/SkillManager.ActiveSkill.cs View File

@@ -33,7 +33,7 @@ namespace Gaming
return ActiveSkillEffect(skill, player, () =>
{
player.AddMoveSpeed(skill.DurationTime, 3.0);
player.BulletOfPlayer = BulletType.Ram;
//player.BulletOfPlayer = BulletType.Ram;
new Thread
(
() =>
@@ -49,8 +49,8 @@ namespace Gaming
{
if (character.IsGhost() != player.IsGhost() && XY.Distance(player.Position + new XY(player.FacingDirection, player.Radius), character.Position) <= character.Radius)
{
if (attackManager.Attack(player, player.FacingDirection.Angle()))
attackManager.BeStunned(player, GameData.TimeOfStudentFainting);
attackManager.BeStunned(character, GameData.TimeOfGhostFainting);
attackManager.BeStunned(player, GameData.TimeOfStudentFainting);
break;
}
}


+ 1
- 1
logic/Preparation/Utility/EnumType.cs View File

@@ -58,7 +58,7 @@ namespace Preparation.Utility
LineBullet = 4, // 直线子弹
FlyingKnife = 5, //飞刀
CommonAttackOfGhost = 6,
Ram = 7,
// Ram = 7,
}
public enum PropType // 道具类型
{


+ 1
- 1
logic/Preparation/Utility/GameData.cs View File

@@ -101,7 +101,7 @@ namespace Preparation.Utility
/// <summary>
/// BeginToCharge
/// </summary>
//public const int TimeOfGhostFainting = 7220;=AP of Ram
public const int TimeOfGhostFainting = 7220;//=AP of Ram
public const int TimeOfStudentFainting = 2090;

#endregion


Loading…
Cancel
Save