the engine behind splitter flash game - working code

the engine behind splitter flash game - working code

ID:22372526

大小:127.00 KB

页数:25页

时间:2018-10-28

the engine behind splitter flash game - working code_第1页
the engine behind splitter flash game - working code_第2页
the engine behind splitter flash game - working code_第3页
the engine behind splitter flash game - working code_第4页
the engine behind splitter flash game - working code_第5页
资源描述:

《the engine behind splitter flash game - working code》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、TheenginebehindSplitterFlashgame:workingcode  Ithinke,theneTheenginebehindSplitterFlashgame–firstAS3prototypeandTheenginebehindSplitterFlashgame–neePommeyakapompomsentusayprototypeofslicingenginetycode,Iresolvedalmostallmyproblems.Dynamics.Contacts.*impo

2、rt Box2D.mon.Math.*import Box2D.mon.*import General.*import flash.display.*;import flash.events.*;import flash.utils.getTimerimport flash.display.MovieClip;  public class Main extends MovieClip{  public function Main(){    m_fpsCounter.x = 7;   m_fpsCounter.y = 5;  

3、 addChildAt(m_fpsCounter, 0);    m_sprite = new123456789下一页[感谢阅读这篇文章,..,]Sprite();   addChild(m_sprite);    m_input = ne_sprite);    addEventListener(Event.ENTER_FRAME, update, false, 0, true);   stage.addEventListener(KeyboardEvent.KEY_DOouseEvent.MOUSE_UP, mouseUp

4、Event);    //Create a b2_sprite;   dbgDra_dra_fillAlpha = 0.3;   dbgDra_lineThickness = 1.0;   dbgDra_dra_e nice shapes   CutterTest();  }   public function CutterTest(){     var ground:b2Body = null;     //Top    var bd:b2BodyDef = ne_    bd.position.Set(0.0, 45); 

5、   ground = m__Shapes();     //Boxes    sd.SetAsBox(3.0, 3.0);    sd.density = 5.0;     bd.userData = 1;    bd.position.Set(25.0, 15.0);    var body1:b2Body = m_Shapes();     sd.SetAsBox(3.0, 3.0);    sd.density = 5.0;     bd.userData = 1;    bd.position.Set(25.0, 1

6、5.0);    body1 = m_Shapes();  }   /***************************************************/  /*********************ETAPE 1***********************/  /***************************************************/   public function CheckPolyShape(poly:b2PolygonDef)  {   if (!(3 <

7、;= poly.vertexCount  poly.vertexCount <= b2_maxPolygonVertices)){     return -1;   }   var m_normals:Array = neals. Ensure the edges have non-zero length.    for (var i=0; i < poly.vertexCount; i++)上一页123456789下一页[感谢阅读这篇文章,..,]{     var i1 = i;     var i2 = 0;

8、      if((i + 1) < poly.vertexCount){      i2 = i + 1;     } else {      i2 = 0;     }      var edge:b2Vec2 = poly.vertices[i2].Copy();

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。