Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * Game_AI TypeScript Format
- */
- declare var $dataAI;
- namespace Emoji{
- /**
- * The superClass of all AI it's process the AI interactions.
- * @class Game_AI
- * @constructor
- * @param {string} interactions the method who call interactions.
- * @access new Emoji.Game_AI(id);
- */
- export class Game_AI {
- private _id: number; // private variable declaration.
- private _personality: any; // private variable declaration.
- /**
- * Will init the AI and private method for get the datas.
- * @param {number} id The ID of the AI.
- */
- constructor(id : number){
- this._id = id;
- this._personality = $dataAI[this._id];
- this.initMembers();
- this.setMessageSystem();
- this.getData();
- this.createContents();
- }
- /**
- * Init the core variable of the system.
- * @private
- */
- private initMembers(){
- }
- /**
- * Set the Message System used for the AI
- * @private
- */
- private setMessageSystem(){}
- /**
- * Get the data from the JSON
- * @private
- */
- private getData(){}
- /**
- * Create the sprite contents of the AI.
- * @private
- */
- private createContents(){}
- /**
- * Start the AI Interactions. It's meant to be call on the start of the Scene.
- * @public
- */
- public start(){}
- /**
- * Update the AI. It's meant to be call in the update method of the scene.
- * @public
- */
- public update(){}
- /**
- * Terminate the AI. It's meant to be call in the terminate method of the scene.
- * @public
- */
- public terminate(){}
- /**
- * [interaction description]
- * @param {string} interactionType [description]
- */
- public interaction(interactionType : string){}
- private startInteraction(interactionType : string){}
- }
- class Sprite_AI extends Sprite {
- private _data: number;
- /**
- * [constructor description]
- * @param {number} id [description]
- */
- constructor(id : number) {
- super();
- this._data = id;
- this.initMembers();
- }
- private initMembers(){}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement