Execute script then laser stops hitting geom
1 post • Page 1 of 1
Execute script then laser stops hitting geom
Knowing excecution order I manage to extend standard events with this:
Now you could do something then laser blocked, turned off or just moved away.
- Code: Select all
_onStopHitByLaser := (e) => {e.this.color = [1,1,1,1]};
_clear := true; _hitting := false; _updated := false;
onHitByLaser = (e) => {e.geom._clear = false};
postStep = (e) => {e.this._updated = false};
update = (e) =>{
sim.running && ! e.this._updated ? {
e.this._clear && e.this._hitting ? {e.this._onStopHitByLaser(e)} : {};
e.this -> {_hitting = ! _clear; _clear = true; _updated = true}
} : {};
};
Now you could do something then laser blocked, turned off or just moved away.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 11 guests




