Comments (5)
Hi, that sounds really weird. Could you provide me a simple game state where I can encounter this issue (no problem on my side) ?
from citrus-engine.
Sure thing. I should mention you need to be in the air when you enter the sensor. But it allows you to double jump in the air. It also causes the hero to go to the idle animation for a brief second, so I am guessing some how the hero is being set to !_onGround.
Here is Main.as
package
{
import com.citrusengine.core.CitrusEngine;
import flash.display.Sprite;
[SWF(framerate="60", width="1024" , height="768", backgroundColor="0xFFFFFF")]
public class Main extends CitrusEngine
{
public function Main()
{
super();
state = new GameState();
}
}
}
And here is GameState.as
package
{
import com.citrusengine.core.State;
import com.citrusengine.objects.platformer.box2d.*;
import com.citrusengine.physics.box2d.Box2D;
import Box2D.Dynamics.Contacts.b2Contact;
public class GameState extends State
{
public function GameState()
{
super();
}
override public function initialize():void
{
super.initialize();
var box2d:Box2D = new Box2D("Box2d");
add(box2d);
box2d.visible = true;
var hero:Hero = new Hero("bob");
hero.x = 320;
hero.y = 240;
add(hero);
var platform:Platform = new Platform("Ground", {width: 500, height:20});
add(platform);
platform.x = 320;
platform.y = 400;
var sensor:Sensor = new Sensor("test", {width:20, height:500});
sensor.x = 150;
sensor.y = 150;
add(sensor);
sensor.onEndContact.add(loadAssettsforArea1);
}
private function loadAssettsforArea1(contact:b2Contact):void
{
// do nothing
}
}
}
from citrus-engine.
I used starling v3 with CEV3-0-0-Away3D-Box2D.swc
from citrus-engine.
Hi Phantamos,
Indeed there was a bug! The Hero was able to jump after a collision with a sensor. It should be fixed now, take a look on the last commit. Try with the source and tell me if everything is ok for you :)
from citrus-engine.
Works now. Thanks.
from citrus-engine.
Related Issues (20)
- MediatorScene._poolObjects after scene cycle, has null. HOT 2
- Implement a 'remove()' method to PhysicsCollisionCategories.as HOT 1
- ObjectMakerStarling is using old QuadBatch HOT 4
- Feathers swc version problem
- rename _realState to _realScene in display list Scene
- Jump bug CE 3.1.12 + Nape HOT 2
- MathUtils
- ViewportMode.FULLSCREEN -> ViewportMode.SHOW_ALL
- GameInput : update CE's input package
- easy way to activate/deactivate objects
- Accessing undefined properties starling.contentScaleFactor HOT 7
- CitrusSoundGroup could be created like any other CE object, not only creating a custom class HOT 3
- FluidBox.as needs to be removed HOT 1
- SpriteArt/StarlingArt dragonBones code HOT 2
- CitrusStarlingJuggler (pausable juggler) per StarlingScene
- Get rid of linked list in the pooling system
- The classes should implement the functions of interface 'ISpriteView' HOT 1
- Camera onPostUpdate / enabled
- Create NapePhysicsCompound/Box2DPhysicsCompound
- Yay
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citrus-engine.