Introduce IWarhead and move Warhead to Mods.Common
This commit is contained in:
@@ -12,9 +12,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Activities;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Primitives;
|
||||
@@ -48,9 +46,9 @@ namespace OpenRA.Traits
|
||||
|
||||
public class AttackInfo
|
||||
{
|
||||
public Actor Attacker;
|
||||
public DamageWarhead Warhead;
|
||||
public int Damage;
|
||||
public Actor Attacker;
|
||||
public IWarhead Warhead;
|
||||
public DamageState DamageState;
|
||||
public DamageState PreviousDamageState;
|
||||
}
|
||||
@@ -353,4 +351,12 @@ namespace OpenRA.Traits
|
||||
void OnObjectiveCompleted(Player player, int objectiveID);
|
||||
void OnObjectiveFailed(Player player, int objectiveID);
|
||||
}
|
||||
|
||||
public interface IWarhead
|
||||
{
|
||||
int Delay { get; }
|
||||
bool IsValidAgainst(Actor victim, Actor firedBy);
|
||||
bool IsValidAgainst(FrozenActor victim, Actor firedBy);
|
||||
void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user