Fix both butterfly examples #1286 #105

Merged
merged 2 commits into from Dec 29, 2016

Projects

None yet

2 participants

@JimMarlowe
Contributor

the JS butterfly example need the Scene object to be referenced so not to be GC'd. I attached it to the Atomic.Player, since that's where it would have been attached if it had loaded a scene.
The CS butterfly example did not have the butterfly emitter with the right mouse button, so that was added.

@JoshEngebretson

Thanks for the PR. This is looking good, only issue is seems have C# editor set to tabs... I know, right? :)

+ var mousePos = input.GetMousePosition();
+
+ createButterflyParticle(new Vector2(mousePos.X, mousePos.Y));
+ }
@JoshEngebretson
JoshEngebretson Dec 29, 2016 Contributor

Good add, though looks like we picked up some tabs here 🌮

@JimMarlowe
JimMarlowe Dec 29, 2016 Contributor

hmmm, I blame pasting into monodevelop! fixed.

@@ -3,6 +3,9 @@
// create a scene
var scene = new Atomic.Scene();
+// assign scene into global so it's not GC'd
+Atomic.Player.currentScene = scene;
@JoshEngebretson
JoshEngebretson Dec 29, 2016 Contributor

Good catch :)

@JoshEngebretson
Contributor

Awesome, thanks :) We all get a bit of tab (or space) tar on us when visiting the pits :)

LANDING! ✈️

@JoshEngebretson JoshEngebretson merged commit 1c9cc28 into AtomicGameEngine:master Dec 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment