forked from tdavies/Ember
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the ability to name an entity and add removeAll() entities func…
…tion to the entitiy manager
- Loading branch information
Showing
11 changed files
with
250 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<actionScriptProperties analytics="false" mainApplicationPath="Ember.as" projectUUID="c028dfdf-c7fe-4f84-a4d2-da9b71d7d03b" version="6"> | ||
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true"> | ||
<compilerSourcePath/> | ||
<libraryPath defaultLinkType="0"> | ||
<libraryPathEntry kind="4" path=""> | ||
<excludedEntries> | ||
<libraryPathEntry kind="1" linkType="1" path="${PROJECT_FRAMEWORKS}/locale/{locale}"/> | ||
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/> | ||
<libraryPathEntry index="4" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/sparkskins.swc" useDefaultLinkType="true"> | ||
<crossDomainRsls> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/sparkskins_4.1.0.16076.swz"/> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="sparkskins_4.1.0.16076.swz"/> | ||
</crossDomainRsls> | ||
</libraryPathEntry> | ||
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" useDefaultLinkType="false"/> | ||
<libraryPathEntry index="2" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" useDefaultLinkType="true"> | ||
<crossDomainRsls> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/framework_4.1.0.16076.swz"/> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="framework_4.1.0.16076.swz"/> | ||
</crossDomainRsls> | ||
</libraryPathEntry> | ||
<libraryPathEntry index="1" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/textLayout.swc" useDefaultLinkType="true"> | ||
<crossDomainRsls> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz"/> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="textLayout_1.1.0.604.swz"/> | ||
</crossDomainRsls> | ||
</libraryPathEntry> | ||
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/utilities.swc" useDefaultLinkType="false"/> | ||
<libraryPathEntry index="4" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/spark.swc" useDefaultLinkType="true"> | ||
<crossDomainRsls> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/spark_4.1.0.16076.swz"/> | ||
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="spark_4.1.0.16076.swz"/> | ||
</crossDomainRsls> | ||
</libraryPathEntry> | ||
</excludedEntries> | ||
</libraryPathEntry> | ||
<libraryPathEntry kind="1" linkType="1" path="libs"/> | ||
</libraryPath> | ||
<sourceAttachmentPath/> | ||
</compiler> | ||
<applications> | ||
<application path="Ember.as"/> | ||
</applications> | ||
<modules/> | ||
<buildCSSFiles/> | ||
</actionScriptProperties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<flexLibProperties includeAllClasses="true" version="3"> | ||
<includeClasses/> | ||
<includeResources/> | ||
<namespaceManifests/> | ||
</flexLibProperties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Ember</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.adobe.flexbuilder.project.flexbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.adobe.flexbuilder.project.flexlibnature</nature> | ||
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#Wed Dec 01 08:58:14 GMT 2010 | ||
eclipse.preferences.version=1 | ||
encoding/<project>=utf-8 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,65 @@ | ||
/* | ||
* Copyright (c) 2010 Tom Davies | ||
* | ||
* Permission is hereby granted to use, modify, and distribute this file | ||
* in accordance with the terms of the license agreement accompanying it. | ||
*/ | ||
|
||
package com.tomseysdavies.ember.base{ | ||
|
||
import com.tomseysdavies.ember.core.IEntity; | ||
import com.tomseysdavies.ember.core.IEntityManger; | ||
|
||
|
||
/** | ||
* this is just a unique key used to retrieve components. It also has some helper function for convenience. | ||
* @author Tom Davies | ||
*/ | ||
public class Entity implements IEntity{ | ||
|
||
private var _entityManger:IEntityManger; | ||
|
||
public function Entity(){ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function addComponent(component:Object):void { | ||
return _entityManger.addComponent(this,component); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getComponent(Component:Class):* { | ||
return _entityManger.getComponent(this,Component); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function removeComponent(Component:Class):void { | ||
_entityManger.removeComponent(this,Component); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function destroy():void{ | ||
_entityManger.removeEntity(this); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function set manager(value:IEntityManger):void{ | ||
_entityManger = value; | ||
} | ||
|
||
} | ||
/* | ||
* Copyright (c) 2010 Tom Davies | ||
* | ||
* Permission is hereby granted to use, modify, and distribute this file | ||
* in accordance with the terms of the license agreement accompanying it. | ||
*/ | ||
|
||
package com.tomseysdavies.ember.base{ | ||
|
||
import com.tomseysdavies.ember.core.IEntity; | ||
import com.tomseysdavies.ember.core.IEntityManger; | ||
|
||
|
||
/** | ||
* this is just class that holds helper functions for convenience. | ||
* @author Tom Davies | ||
*/ | ||
public class Entity implements IEntity{ | ||
|
||
private var _entityManger:IEntityManger; | ||
private var _id:String; | ||
|
||
public function Entity(entityManger:IEntityManger,id:String){ | ||
_entityManger = entityManger; | ||
_id = id; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function addComponent(component:Object):void { | ||
return _entityManger.addComponent(_id,component); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getComponent(Component:Class):* { | ||
return _entityManger.getComponent(_id,Component); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function removeComponent(Component:Class):void { | ||
_entityManger.removeComponent(_id,Component); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function destroy():void{ | ||
_entityManger.removeEntity(_id); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function get id():String{ | ||
return _id; | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.