public void addMob(Component act, Component pos) { Entity skeleton = new Entity(); skeleton.AddComponent((Animation)act); skeleton.AddComponent((Position)pos); skeleton.AddAction(new ChangeAbsPosition()); skeleton.AddAction(new ChangeDirectionOfAnimation()); skeleton.AddAction(new MoveTowardsPlayer()); mobDict.Add(getNextKey(), skeleton); }
public void AddComponent(Component component) { this.components.Add(component.Name, component); }