-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from asdawej/dev
Create null default for all factories
- Loading branch information
Showing
15 changed files
with
115 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Areas; | ||
|
||
public class NullArea : Immovable | ||
{ | ||
public override bool IsRigid => false; | ||
public override ShapeType Shape => ShapeType.Null; | ||
public NullArea(XY initPos) | ||
: base(initPos, int.MaxValue, GameObjType.Null) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Bullets; | ||
|
||
internal sealed class NullBullet : Bullet | ||
{ | ||
public override double BulletBombRange => 0; | ||
public override double AttackDistance => 0; | ||
public override int Speed => 0; | ||
public override int CastTime => 0; | ||
public override int SwingTime => 0; | ||
public override int CD => 0; | ||
public override int MaxBulletNum => 0; | ||
public override BulletType TypeOfBullet => BulletType.Null; | ||
public override bool CanAttack(GameObj target) => false; | ||
public override bool CanBeBombed(GameObjType gameObjType) => false; | ||
public NullBullet(Ship ship, XY Position, int radius = GameData.BulletRadius) | ||
: base(ship, radius, Position) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Preparation.Interface; | ||
|
||
namespace GameClass.GameObj.Modules; | ||
|
||
public class NullArmor : IArmor | ||
{ | ||
public int ArmorHP => 0; | ||
public int Cost => 0; | ||
} |
9 changes: 9 additions & 0 deletions
9
logic/GameClass/GameObj/Modules/NullModules/NullConstructor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Preparation.Interface; | ||
|
||
namespace GameClass.GameObj.Modules; | ||
|
||
public class NullConstructor : IConstructor | ||
{ | ||
public int ConstructSpeed => 0; | ||
public int Cost => 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Preparation.Interface; | ||
|
||
namespace GameClass.GameObj.Modules; | ||
|
||
public class NullProducer : IProducer | ||
{ | ||
public int ProduceSpeed => 0; | ||
public int Cost => 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Preparation.Interface; | ||
|
||
namespace GameClass.GameObj.Modules; | ||
|
||
public class NullShield : IShield | ||
{ | ||
public int ShieldHP => 0; | ||
public int Cost => 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Modules; | ||
|
||
public class NullWeapon : IWeapon | ||
{ | ||
public BulletType BulletType => BulletType.Null; | ||
public int Cost => 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Preparation.Interface; | ||
|
||
namespace GameClass.GameObj.Occupations; | ||
|
||
public class NullOccupation : IOccupation | ||
{ | ||
public int MoveSpeed => 0; | ||
public int MaxHp => 0; | ||
public int ViewRange => 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters