public DeusGameObject CreateGameObject(GameObjectCreateArgs args) { // Create all the components List <DeusComponent> components = new List <DeusComponent>(); foreach (var component in args.ComponentsInfos) { components.Add(GameComponentFactory.CreateComponent(component, args.GameObjectId)); } // Create the gameobject DeusGameObject gameObject = new DeusGameObject(args, components); // notify the view that there is a new object to display PacketCreateViewObject packet = new PacketCreateViewObject(); packet.LinkedGameObject = gameObject; packet.ObjectId = gameObject.UniqueIdentifier; EventManager.Get().EnqueuePacket(0, packet); return(gameObject); }
public ViewObjectCreateArgs(DeusGameObject linkedGameObject) { LinkedGameObject = linkedGameObject; }