Saving (wip), statuseffect refactoring, multiple character faces

This commit is contained in:
Regalis
2015-06-12 16:56:51 +03:00
parent 270efd77e0
commit 566d54197a
35 changed files with 640 additions and 268 deletions
+10 -9
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.Xml.Linq;
namespace Subsurface
@@ -11,9 +12,9 @@ namespace Subsurface
float timer;
private Item item;
Vector2 position;
private Character character;
List<IPropertyObject> targets;
public float Timer
{
@@ -26,14 +27,14 @@ namespace Subsurface
delay = ToolBox.GetAttributeFloat(element, "delay", 1.0f);
}
public override void Apply(ActionType type, float deltaTime, Item item, Character character = null)
public override void Apply(ActionType type, float deltaTime, Vector2 position, List<IPropertyObject> targets)
{
if (this.type != type) return;
this.item = item;
this.character = character;
timer = delay;
this.position = position;
this.targets = targets;
list.Add(this);
}
@@ -44,7 +45,7 @@ namespace Subsurface
if (timer > 0.0f) return;
base.Apply(1.0f, character, item);
base.Apply(1.0f, position, targets);
list.Remove(this);
}