Skip to content

Instantly share code, notes, and snippets.

@Vonflaken
Created September 27, 2019 16:18
Show Gist options
  • Save Vonflaken/748198ac7c12d43fd6b159afe4daa7ad to your computer and use it in GitHub Desktop.
Save Vonflaken/748198ac7c12d43fd6b159afe4daa7ad to your computer and use it in GitHub Desktop.
const dclutils : any = {
getEntityWithName(name : string) : Entity
{
for (let entityKey in engine.entities)
{
let entity = <Entity>engine.entities[entityKey]
if (entity.name == name)
return entity
}
return null
}
}
export default dclutils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment