1 /** 2 * The Render Engine 3 * LogicComponent 4 * 5 * @fileoverview The base logic component. 6 * 7 * @author: Brett Fattori (brettf@renderengine.com) 8 * @author: $Author: bfattori $ 9 * @version: $Revision: 1555 $ 10 * 11 * Copyright (c) 2011 Brett Fattori (brettf@renderengine.com) 12 * 13 * Permission is hereby granted, free of charge, to any person obtaining a copy 14 * of this software and associated documentation files (the "Software"), to deal 15 * in the Software without restriction, including without limitation the rights 16 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 * copies of the Software, and to permit persons to whom the Software is 18 * furnished to do so, subject to the following conditions: 19 * 20 * The above copyright notice and this permission notice shall be included in 21 * all copies or substantial portions of the Software. 22 * 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 * THE SOFTWARE. 30 * 31 */ 32 33 // The class this file defines and its required classes 34 R.Engine.define({ 35 "class":"R.components.Logic", 36 "requires":[ 37 "R.components.Base" 38 ] 39 }); 40 41 /** 42 * @class Logic components are sort of a catch-all of components. They aren't 43 * any one of the specific types, so they fall under the type of LOGIC. 44 * Logic components are in the middle of the importance scale, so they 45 * are processed after input and transformations, but before collision and 46 * rendering. This makes them ideal for additional processing, such as the 47 * {@link R.components.HostComponent}. 48 * 49 * @param name {String} The name of the component 50 * @param [priority=1.0] {Number} The priority of the component 51 * @extends R.components.Base 52 * @constructor 53 * @description Creates a logic component. 54 */ 55 R.components.Logic = function () { 56 "use strict"; 57 return R.components.Base.extend(/** @scope R.components.Logic.prototype */{ 58 59 /** 60 * @private 61 */ 62 constructor:function (name, priority) { 63 this.base(name, R.components.Base.TYPE_LOGIC, priority || 1.0); 64 } 65 }, /** @scope R.components.Logic.prototype */{ 66 /** 67 * Get the class name of this object 68 * @return {String} "R.components.Logic" 69 */ 70 getClassName:function () { 71 return "R.components.Logic"; 72 } 73 }); 74 }