Extend child API
This commit is contained in:
parent
dbf82389e0
commit
f312f9335e
|
|
@ -102,10 +102,27 @@ public struct Entity {
|
||||||
nexus.destroy(entity: self)
|
nexus.destroy(entity: self)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func addChild(_ entity: Entity) {
|
/// Add an entity as child.
|
||||||
|
/// - Parameter entity: The child entity.
|
||||||
|
@discardableResult
|
||||||
|
public func addChild(_ entity: Entity) -> Bool {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
public func removeChild(_ entity: Entity) {
|
/// Remove entity as child.
|
||||||
|
/// - Parameter entity: The child entity.
|
||||||
|
@discardableResult
|
||||||
|
public func removeChild(_ entity: Entity) -> Bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Removes all children from this entity.
|
||||||
|
public func removeAllChildren() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the number of children for this entity.
|
||||||
|
public var numChildren: Int {
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ extension Family {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
fatalError("implement")
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue