0

我已经开始了解 Starling,然后我找到了 Nape。在 GotoAndLearn.com,我找到了使用它们的教程,并且我使用几乎相同的原理进行了自己的测试。

我已将该项目上传到 github,以便更好地理解该问题:

https://github.com/alesys/RolfNapeStarlingTest

我正在使用 Flash Builder 4.7(测试版),从 Flash Pro CS6 导出精灵表,使用 Starling 和 Nape 的最新 SWC,以及最新的 XCode。

我有 4 节课:

  1. RolfNapeTest延伸flash.display.Sprite。这是主课。

  2. Assets. 它用于嵌入纹理。

  3. Game延伸starling.display.Sprite。处理所有 Nape 的东西。

  4. Char延伸starling.display.Sprite。显示随机纹理Assets并监听starling.events.TouchEvent.

所以,我读到的一件事是确保将纹理嵌入到一个单独的静态类中。所以我在Assets课堂上做了这个。

public static function getTexture(spriteName:String):Vector.<Texture>
        {
            if (!atlas)
                atlas = new TextureAtlas(Texture.fromBitmap(new SPRITES()),XML(new XMLSPRITES()));
            return atlas.getTextures(spriteName);
        }

Char类也很简单:

package
{
    import nape.geom.Vec2;
    import nape.phys.Body;

    import starling.display.MovieClip;
    import starling.display.Sprite;
    import starling.events.Event;
    import starling.events.TouchEvent;
    import starling.events.TouchPhase;

    public class Char extends Sprite
    {
        private var body:Body;
        public function Char(body:Body)
        {
            super();
            this.body = body;
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
        private function init(e:Event):void
        {
            addChild(new MovieClip(Assets.getTexture((Math.random()>0.5)?Assets.SPRITE_FLAVIA:Assets.SPRITE_MARIANA)));
            pivotX = width>>1;
            pivotY = height>>1;

            addEventListener(TouchEvent.TOUCH, handle_touch);
        }
        private function handle_touch(te:TouchEvent):void
        {
            if ( te.getTouch(this,TouchPhase.BEGAN))
            {
                body.velocity = new Vec2(Math.random()*1000-500,-2000);
            }
        }
    }
}

它接收一个Body实例作为参数,加载一个纹理,监听一个touch事件,当它发生时改变Body速度。

现在,处理 Nape 的类是Game

package
{
    import nape.geom.Vec2;
    import nape.phys.Body;
    import nape.phys.BodyType;
    import nape.phys.Material;
    import nape.shape.Polygon;
    import nape.space.Space;

    import starling.display.DisplayObject;
    import starling.display.Sprite;
    import starling.events.Event;

    public class Game extends Sprite
    {
        private var space:Space;
        private var count:int;
        public function Game()
        {
            super();
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
        private function init(e:Event):void
        {
            space = new Space(new Vec2(0,3000));

            var walls:Body = new Body(BodyType.STATIC);

            var wall_left:Polygon = new Polygon(Polygon.rect(-20,0,20,stage.stageHeight));
            var wall_right:Polygon = new Polygon(Polygon.rect(stage.stageWidth,0,20,stage.stageHeight));
            var floor:Polygon = new Polygon(Polygon.rect(0,stage.stageHeight,stage.stageWidth,20));

            walls.shapes.add(wall_left);
            walls.shapes.add(wall_right);
            walls.shapes.add(floor);

            walls.space = space;
            count = 0;
            addEventListener(Event.ENTER_FRAME, loop);
        }
        private function loop(e:Event):void
        {
            if ( Math.random()<0.03 && count < 50)
            {
                count++;
                addChar();
            }
            space.step(1/60);
        }

        private function addChar():void
        {

            var body:Body = new Body(BodyType.DYNAMIC,new Vec2(Math.random()*stage.stageWidth,-200));
            body.shapes.add(new Polygon(Polygon.box(50,100),new Material(20)));
            body.graphic = new Char(body);
            body.graphicUpdate = graphicUpdate;
            body.space = space;
            addChild(body.graphic);
        }

        private function graphicUpdate(body:Body):void
        {

            var gra:DisplayObject = body.graphic as DisplayObject;
            gra.x = body.position.x;
            gra.y = body.position.y;
            gra.rotation = body.rotation;
        }
    }
}

如您所见,它非常直。创建一个Space实例,然后创建一些墙,最后监听Event.ENTER_FRAME调用Space.step()并随机创建新Char实例。

现在我明白了,可能我应该创建所有 50 个Char类实例并将Object它们汇集起来。但我也明白这只会影响实例化时的性能。但可能这将是我将在下一次提交中修改的第一件事。

因此,在 Browser 和 Air 上对其进行了测试,效果很好。永远不会像预期的那样从 60fps 下降。

然后我在我的 iPhone4S 上试了一下。在我达到大约 30 个实例之前,一切都以 60fps 的速度顺利进行。然后它开始急剧下降,直到达到 30fps。

另外我必须补充一点:出于某种原因,我收到了来自 Nape SWC 的很多警告:

Description Resource    Path    Location    Type
The definition getClass.T depended on by Type in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition getClass.T depended on by Type in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by flash.Boot in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by flash.Boot in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.CbTypeList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.CbTypeList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.Listener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.Listener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.ListenerList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.ListenerList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.PreListener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.callbacks.PreListener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.constraint.Constraint in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.constraint.Constraint in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.constraint.ConstraintList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.constraint.ConstraintList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.dynamics.ArbiterList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.dynamics.ArbiterList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.dynamics.ContactList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.dynamics.ContactList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.dynamics.InteractionGroupList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.dynamics.InteractionGroupList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.geom.GeomPoly in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.geom.GeomPoly in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.geom.GeomPolyList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.geom.GeomPolyList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.geom.RayResultList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.geom.RayResultList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.geom.Vec2List in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.geom.Vec2List in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.phys.BodyList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.phys.BodyList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.phys.CompoundList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.phys.CompoundList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.phys.InteractorList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.phys.InteractorList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.shape.EdgeList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.shape.EdgeList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.shape.ShapeList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.shape.ShapeList in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by nape.space.Space in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition Null.T depended on by nape.space.Space in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by StringTools in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by StringTools in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_Callback in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_Callback in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_InteractionListener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_InteractionListener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_Listener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_Listener in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_OptionType in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.callbacks.ZPP_OptionType in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_AABB in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_AABB in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Collide in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Collide in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_GeomPoly in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_GeomPoly in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_GeomVert in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_GeomVert in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Mat23 in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Mat23 in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Ray in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Ray in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Vec2 in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Vec2 in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Vec3 in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.geom.ZPP_Vec3 in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.phys.ZPP_Compound in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.phys.ZPP_Compound in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.phys.ZPP_Interactor in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.phys.ZPP_Interactor in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.shape.ZPP_Polygon in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.shape.ZPP_Polygon in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.space.ZPP_DynAABBPhase in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.space.ZPP_DynAABBPhase in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.space.ZPP_Space in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.space.ZPP_Space in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.space.ZPP_SweepPhase in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.space.ZPP_SweepPhase in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Debug in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Debug in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_MixVec2List in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_MixVec2List in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_Body in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_Body in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found  RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_CbSet in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_CbSet in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_CbSetPair in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_CbSetPair in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_PartitionVertex in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_PartitionVertex in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_SimpleEvent in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_SimpleEvent in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found   RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_SimpleSeg in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_SimpleSeg in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found RolfNapeTest        line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_SimpleVert in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    NapeTest2       line 0  Flex Problem
The definition Null.T depended on by zpp_nape.util.ZPP_Set_ZPP_SimpleVert in the SWC /Users/rolf/Documents/AS3 libs/Nape/swc/release_nape.swc could not be found    RolfNapeTest        line 0  Flex Problem

所以,问题是:除了Object汇集所有Char实例之外,我是否遗漏了其他可能导致 FPS 下降的东西?也许来自 SWC 的所有这些警告消息都与此有关,但为什么这不会在 Air 或 Browser 上发生?

还是我应该简单地切换到 Box2DFlashAS3?

感谢您的阅读。

4

0 回答 0