示例#1
0
        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);
        }
示例#2
0
 public void AddComponent(Component component)
 {
     this.components.Add(component.Name, component);
 }