Image:
 Author: Otacon140.96 Group: Default Filesize: 60.67 kB Date added: 2009-04-01 Rating: 5 Downloads: 1708 Views: 1514 Comments: 4 Ratings: 1 Times favored: 0 Made with: Phun Tags:
|
This is the smallest logic gate i've ever made. I used no thyme variables, but there is some script code for the red circle in the middle of the gate. It works with color information of the different polygons.
It's not finished, so your welcome to improve it!
Thyme functions:
[red circle]
OnCollide:
(e)=>{
_e.other.color == [1.0, 1.0, 1.0, 1.0] &&
_e.this.color == [1.0, 0.0, 0.0, 1.0] ? {
__e.other.color = [0.0, 0.0, 0.0, 1.0];
__e.this.color = [1.0, 1.0, 0.0, 1.0]
_} : {
__e.other.color == [1.0, 1.0, 1.0, 1.0] &&
__e.this.color == [1.0, 1.0, 0.0, 1.0] ? {
___e.this.color = [0.0, 1.0, 0.0, 1.0]
__} : {
___e.other.color == [0.0, 0.0, 0.0, 1.0] &&
___e.this.color == [0.0, 1.0, 0.0, 1.0] ? {
____e.other.color = [1.0, 1.0, 1.0, 1.0];
____e.this.color = [1.0, 0.0, 0.0, 1.0]
___} : {
____e.this.color = [1.0, 0.0, 0.0, 1.0]
___}
__}
_}
}
[white circles]
OnCollide:
(e)=>{e.other.color = e.this.color} |