Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -88,6 +88,13 @@ def add_component(componentName, entityId):
|
||||
return componentOutcome.GetValue()[0]
|
||||
|
||||
|
||||
def add_component_of_type(componentTypeId, entityId):
|
||||
typeIdsList = [componentTypeId]
|
||||
componentOutcome = editor.EditorComponentAPIBus(
|
||||
azlmbr.bus.Broadcast, 'AddComponentsOfType', entityId, typeIdsList)
|
||||
return componentOutcome.GetValue()[0]
|
||||
|
||||
|
||||
def remove_component(component_name, entity_id):
|
||||
"""
|
||||
Removes the specified component from the specified entity.
|
||||
@@ -213,6 +220,10 @@ class Entity:
|
||||
new_component = add_component(component, self.id)
|
||||
self.components.append(new_component)
|
||||
|
||||
def add_component_of_type(self, componentTypeId):
|
||||
new_component = add_component_of_type(componentTypeId, self.id)
|
||||
self.components.append(new_component)
|
||||
|
||||
def remove_component(self, component):
|
||||
removed_component = remove_component(component, self.id)
|
||||
if removed_component is not None:
|
||||
|
||||
Reference in New Issue
Block a user