UNPKG

pubtool4pixi

Version:

Usefultool for PIXI xes project

1,576 lines (367 loc) 17.2 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Base</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: Base</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Base<span class="signature">()</span><span class="type-signature"></span></h2> <div class="class-description">Easy基础类.</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Base"><span class="type-signature"></span>new Base<span class="signature">()</span><span class="type-signature"></span></h4> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>Map</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">组件模板映射表</td> </tr> <tr> <td class="name"><code>InstanceMap</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">实例映射表</td> </tr> <tr> <td class="name"><code>randomId</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">随机ID记录器</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line865">line 865</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".create"><span class="type-signature">(static) </span>create<span class="signature">(className, extraProp)</span><span class="type-signature"> &rarr; {<a href="BaseContainer.html">BaseContainer</a>}</span></h4> <div class="description"> Create a instance from model </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>className</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">model's name</td> </tr> <tr> <td class="name"><code>extraProp</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">instance's prop</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line893">line 893</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Return a instance which designed by model </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="BaseContainer.html">BaseContainer</a></span> </dd> </dl> <h4 class="name" id=".define"><span class="type-signature">(static) </span>define<span class="signature">(className, prop)</span><span class="type-signature"></span></h4> <div class="description"> Define a model </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>className</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">model's name</td> </tr> <tr> <td class="name"><code>prop</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">model's prop</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line880">line 880</a> </li></ul></dd> </dl> <h4 class="name" id=".destroy"><span class="type-signature">(static) </span>destroy<span class="signature">(instance)</span><span class="type-signature"></span></h4> <div class="description"> remove instance which has been given </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>instance</code></td> <td class="type"> <span class="param-type"><a href="BaseContainer.html">BaseContainer</a></span> </td> <td class="description last">the instance want to destroy;</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line1019">line 1019</a> </li></ul></dd> </dl> <h4 class="name" id=".getCmp"><span class="type-signature">(static) </span>getCmp<span class="signature">(id)</span><span class="type-signature"> &rarr; {<a href="BaseContainer.html">BaseContainer</a>}</span></h4> <div class="description"> get a created instance </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">className or ID</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line929">line 929</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> A instance </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="BaseContainer.html">BaseContainer</a></span> </dd> </dl> <h4 class="name" id=".moveInterface"><span class="type-signature">(static) </span>moveInterface<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> create a movable display object </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> <span class="param-type">PIXI.DisplayObject</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line1029">line 1029</a> </li></ul></dd> </dl> <h4 class="name" id=".observable"><span class="type-signature">(static) </span>observable<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> create a observable object </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line1038">line 1038</a> </li></ul></dd> </dl> <h4 class="name" id=".removeAll"><span class="type-signature">(static) </span>removeAll<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> remove all instance except static instance </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line994">line 994</a> </li></ul></dd> </dl> <h4 class="name" id=".removeAllAndStaitic"><span class="type-signature">(static) </span>removeAllAndStaitic<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> remove all instance </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line1008">line 1008</a> </li></ul></dd> </dl> <h4 class="name" id=".shakeContainer"><span class="type-signature">(static) </span>shakeContainer<span class="signature">(stage, Num, dist, useTime)</span><span class="type-signature"> &rarr; {Promise}</span></h4> <div class="description"> a shake container animate </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>stage</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">摇晃的容器</td> </tr> <tr> <td class="name"><code>Num</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">摇晃次数默认3</td> </tr> <tr> <td class="name"><code>dist</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">摇晃距离</td> </tr> <tr> <td class="name"><code>useTime</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">单次摇晃时间</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easy.js.html">easy.js</a>, <a href="easy.js.html#line1047">line 1047</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Base.html">Base</a></li><li><a href="BaseContainer.html">BaseContainer</a></li><li><a href="BigMath_AniBtn.html">BigMath_AniBtn</a></li><li><a href="BigMath_GuideHand.html">BigMath_GuideHand</a></li><li><a href="BigMath_StarScoreBoard.html">BigMath_StarScoreBoard</a></li><li><a href="BigMath_Timer.html">BigMath_Timer</a></li><li><a href="HitContainer.html">HitContainer</a></li><li><a href="Preschool_aqiu.html">Preschool_aqiu</a></li><li><a href="Preschool_End.html">Preschool_End</a></li><li><a href="Preschool_HintBtn.html">Preschool_HintBtn</a></li><li><a href="Preschool_Start.html">Preschool_Start</a></li><li><a href="PUB_Mask.html">PUB_Mask</a></li></ul><h3>Events</h3><ul><li><a href="BaseContainer.html#.event:beforeHide">beforeHide</a></li><li><a href="BaseContainer.html#.event:beforeShow">beforeShow</a></li><li><a href="BaseContainer.html#.event:Destroyed">Destroyed</a></li><li><a href="BaseContainer.html#.event:onHide">onHide</a></li><li><a href="BaseContainer.html#.event:onShow">onShow</a></li><li><a href="BaseContainer.html#.event:ParentChange">ParentChange</a></li><li><a href="BigMath_AniBtn.html#.event:onClick">onClick</a></li><li><a href="BigMath_Timer.html#.event:onTimeRun">onTimeRun</a></li><li><a href="BigMath_Timer.html#.event:timeup">timeup</a></li><li><a href="Preschool_End.html#.event:gameOver">gameOver</a></li><li><a href="Preschool_Start.html#.event:startGame">startGame</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.2</a> on Wed Dec 18 2019 14:22:09 GMT+0800 (中国标准时间) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>