상속: UnityEngine.MonoBehaviour
예제 #1
0
	public void Rule0(float dt, World world){ 
	switch (s0)
	{

	case -1:
	Texture = "both_up";
	Yes = false;
	s0 = 3;
return;
	case 3:
	if(!(((((!(world.RunningTutorial)) && (UnityEngine.Input.GetMouseButtonDown(0)))) && (IsYesPressed))))
	{

	s0 = 3;
return;	}else
	{

	goto case 2;	}
	case 2:
	Texture = "Yes_down";
	Yes = true;
	s0 = 0;
return;
	case 0:
	count_down5 = 0.1f;
	goto case 1;
	case 1:
	if(((count_down5) > (0f)))
	{

	count_down5 = ((count_down5) - (dt));
	s0 = 1;
return;	}else
	{

	s0 = -1;
return;	}	
	default: return;}}
예제 #2
0
	public void Rule1(float dt, World world){ 
	switch (s1)
	{

	case -1:
	Texture = "both_up";
	No = false;
	s1 = 3;
return;
	case 3:
	if(!(((((!(world.RunningTutorial)) && (UnityEngine.Input.GetMouseButtonDown(0)))) && (IsNoPressed))))
	{

	s1 = 3;
return;	}else
	{

	goto case 2;	}
	case 2:
	Texture = "No_down";
	No = true;
	s1 = 0;
return;
	case 0:
	count_down6 = 0.1f;
	goto case 1;
	case 1:
	if(((count_down6) > (0f)))
	{

	count_down6 = ((count_down6) - (dt));
	s1 = 1;
return;	}else
	{

	s1 = -1;
return;	}	
	default: return;}}
예제 #3
0
	public void Rule5(float dt, World world){ 
	switch (s5)
	{

	case -1:
	if(!(PauseButton.Pressed))
	{

	s5 = -1;
return;	}else
	{

	goto case 2;	}
	case 2:
	PauseMenu = (new Just<PauseMenu>(new PauseMenu()));
	Time.timeScale = 0f;
	s5 = 1;
return;
	case 1:
	UnityAudio.Pause();
	goto case 0;
	case 0:
	if(!(!(PauseButton.Pressed)))
	{

	s5 = 0;
return;	}else
	{

	s5 = -1;
return;	}	
	default: return;}}
예제 #4
0
	public void Update(float dt, World world) {
frame = World.frame;

		this.Rule0(dt, world);
		this.Rule1(dt, world);
	}
예제 #5
0
	public void Rule3(float dt, World world){ 
	switch (s3)
	{

	case -1:
	
	counter13 = -1;
	if((((Foreground.CheckPoints).Count) == (0)))
	{

	s3 = -1;
return;	}else
	{

	___item32 = (Foreground.CheckPoints)[0];
	goto case 1;	}
	case 1:
	counter13 = ((counter13) + (1));
	if((((((Foreground.CheckPoints).Count) == (counter13))) || (((counter13) > ((Foreground.CheckPoints).Count)))))
	{

	s3 = -1;
return;	}else
	{

	___item32 = (Foreground.CheckPoints)[counter13];
	goto case 2;	}
	case 2:
	if(!(!(StopGame)))
	{

	s3 = 2;
return;	}else
	{

	goto case 14;	}
	case 14:
	CurrentCheckpoint = (new Just<UnityEngine.Transform>(___item32));
	Bird.Walk = true;
	Bird.Position = Bird.Position;
	Bird.Destination = Bird.Destination;
	s3 = 13;
return;
	case 13:
	if(!(Fox.Walk))
	{

	s3 = 13;
return;	}else
	{

	goto case 12;	}
	case 12:
	if(!(!(Fox.Walk)))
	{

	s3 = 12;
return;	}else
	{

	goto case 11;	}
	case 11:
	CurrentCheckpoint = CurrentCheckpoint;
	Bird.Walk = Bird.Walk;
	Bird.Position = Bird.Enter;
	Bird.Destination = ___item32.position;
	s3 = 10;
return;
	case 10:
	if(!(((0.1f) > (UnityEngine.Vector3.Distance(Bird.Position,___item32.position)))))
	{

	s3 = 10;
return;	}else
	{

	goto case 9;	}
	case 9:
	CurrentCheckpoint = CurrentCheckpoint;
	Bird.Walk = false;
	Bird.Position = Bird.Destination;
	Bird.Destination = Bird.Destination;
	s3 = 8;
return;
	case 8:
	if(!(Bird.Sing))
	{

	s3 = 8;
return;	}else
	{

	goto case 7;	}
	case 7:
	if(!(!(Bird.Sing)))
	{

	s3 = 7;
return;	}else
	{

	goto case 6;	}
	case 6:
	if(!(((Button.Yes) || (Button.No))))
	{

	s3 = 6;
return;	}else
	{

	goto case 5;	}
	case 5:
	CurrentCheckpoint = CurrentCheckpoint;
	Bird.Walk = true;
	Bird.Position = Bird.Position;
	Bird.Destination = Bird.Exit;
	s3 = 4;
return;
	case 4:
	if(!(((0.1f) > (UnityEngine.Vector3.Distance(Bird.Position,Bird.Exit)))))
	{

	s3 = 4;
return;	}else
	{

	goto case 3;	}
	case 3:
	CurrentCheckpoint = (new Nothing<UnityEngine.Transform>());
	Bird.Walk = false;
	Bird.Position = Bird.Exit;
	Bird.Destination = Bird.Destination;
	s3 = 1;
return;	
	default: return;}}
예제 #6
0
	public void Rule4(float dt, World world){ 
	switch (s4)
	{

	case -1:
	if(!(((PauseMenu.IsSome) && (PauseMenu.Value.Resume))))
	{

	s4 = -1;
return;	}else
	{

	goto case 1;	}
	case 1:
	UnityAudio.Resume();
	PauseMenu.Value.Destroyed = true;
	PauseMenu = (new Nothing<PauseMenu>());
	Time.timeScale = 1f;
	s4 = -1;
return;	
	default: return;}}
예제 #7
0
	public void Rule1(float dt, World world){ 
	switch (s1)
	{

	case -1:
	
	counter121 = -1;
	if((((TrackManager.CurrentTutorial).Count) == (0)))
	{

	goto case 4;	}else
	{

	___item10 = (TrackManager.CurrentTutorial)[0];
	goto case 12;	}
	case 12:
	counter121 = ((counter121) + (1));
	if((((((TrackManager.CurrentTutorial).Count) == (counter121))) || (((counter121) > ((TrackManager.CurrentTutorial).Count)))))
	{

	goto case 4;	}else
	{

	___item10 = (TrackManager.CurrentTutorial)[counter121];
	goto case 13;	}
	case 13:
	CurrentTrack = (new Just<Track.Item>(___item10));
	AnimationEnd = true;
	Button.Yes = Button.Yes;
	Button.Index = Button.Index;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = true;
	StopGame = StopGame;
	s1 = 29;
return;
	case 29:
	if(!(Bird.Sing))
	{

	s1 = 29;
return;	}else
	{

	goto case 28;	}
	case 28:
	if(!(!(Bird.Sing)))
	{

	s1 = 28;
return;	}else
	{

	goto case 26;	}
	case 26:
	count_down2 = 2f;
	goto case 27;
	case 27:
	if(((count_down2) > (0f)))
	{

	count_down2 = ((count_down2) - (dt));
	s1 = 27;
return;	}else
	{

	goto case 25;	}
	case 25:
	if(___item10.IsSame)
	{

	___texture10 = "yes_frames";	}else
	{

	___texture10 = "no_frames";	}
	CurrentTrack = CurrentTrack;
	AnimationEnd = AnimationEnd;
	Button.Yes = Button.Yes;
	Button.Index = 0;
	Button.AnimationNumber = 5;
	Button.Texture = ___texture10;
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 18;
return;
	case 18:
	
	counter191 = -1;
	if((((Enumerable.Range(0,((1) + (((((Button.AnimationNumber) - (1))) - (0))))).ToList<System.Int32>()).Count) == (0)))
	{

	goto case 17;	}else
	{

	___i10 = (Enumerable.Range(0,((1) + (((((Button.AnimationNumber) - (1))) - (0))))).ToList<System.Int32>())[0];
	goto case 19;	}
	case 19:
	counter191 = ((counter191) + (1));
	if((((((Enumerable.Range(0,((1) + (((((Button.AnimationNumber) - (1))) - (0))))).ToList<System.Int32>()).Count) == (counter191))) || (((counter191) > ((Enumerable.Range(0,((1) + (((((Button.AnimationNumber) - (1))) - (0))))).ToList<System.Int32>()).Count)))))
	{

	goto case 17;	}else
	{

	___i10 = (Enumerable.Range(0,((1) + (((((Button.AnimationNumber) - (1))) - (0))))).ToList<System.Int32>())[counter191];
	goto case 20;	}
	case 20:
	CurrentTrack = CurrentTrack;
	AnimationEnd = AnimationEnd;
	Button.Yes = Button.Yes;
	Button.Index = ___i10;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 21;
return;
	case 21:
	count_down1 = 0.15f;
	goto case 22;
	case 22:
	if(((count_down1) > (0f)))
	{

	count_down1 = ((count_down1) - (dt));
	s1 = 22;
return;	}else
	{

	s1 = 19;
return;	}
	case 17:
	CurrentTrack = (new Nothing<Track.Item>());
	AnimationEnd = true;
	Button.Yes = true;
	Button.Index = 0;
	Button.AnimationNumber = 1;
	Button.Texture = "both_up";
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 16;
return;
	case 16:
	CurrentTrack = CurrentTrack;
	AnimationEnd = AnimationEnd;
	Button.Yes = false;
	Button.Index = Button.Index;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 15;
return;
	case 15:
	if(!(!(AnimationEnd)))
	{

	s1 = 15;
return;	}else
	{

	goto case 14;	}
	case 14:
	CurrentTrack = CurrentTrack;
	AnimationEnd = true;
	Button.Yes = Button.Yes;
	Button.Index = Button.Index;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 12;
return;
	case 4:
	
	counter51 = -1;
	if((((TrackManager.CurrentExperiment).Count) == (0)))
	{

	goto case 3;	}else
	{

	___item110 = (TrackManager.CurrentExperiment)[0];
	goto case 5;	}
	case 5:
	counter51 = ((counter51) + (1));
	if((((((TrackManager.CurrentExperiment).Count) == (counter51))) || (((counter51) > ((TrackManager.CurrentExperiment).Count)))))
	{

	goto case 3;	}else
	{

	___item110 = (TrackManager.CurrentExperiment)[counter51];
	goto case 6;	}
	case 6:
	CurrentTrack = (new Just<Track.Item>(___item110));
	AnimationEnd = true;
	Button.Yes = Button.Yes;
	Button.Index = Button.Index;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 9;
return;
	case 9:
	CurrentTrack = CurrentTrack;
	AnimationEnd = true;
	Button.Yes = Button.Yes;
	Button.Index = Button.Index;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = false;
	StopGame = StopGame;
	s1 = 8;
return;
	case 8:
	if(!(!(AnimationEnd)))
	{

	s1 = 8;
return;	}else
	{

	goto case 7;	}
	case 7:
	CurrentTrack = CurrentTrack;
	AnimationEnd = true;
	Button.Yes = Button.Yes;
	Button.Index = Button.Index;
	Button.AnimationNumber = Button.AnimationNumber;
	Button.Texture = Button.Texture;
	RunningTutorial = RunningTutorial;
	StopGame = StopGame;
	s1 = 5;
return;
	case 3:
	___elems10 = TrackManager.ItemsToPlay;
	Track.TrackManager.SaveAll();
	Track.TrackManager.MoveNextExperiment();
	UnityEngine.Application.LoadLevel("End");
	s1 = -1;
return;	
	default: return;}}
예제 #8
0
	public void Rule2(float dt, World world){ 
	switch (s2)
	{

	case -1:
	if(!(AnimationEnd))
	{

	s2 = -1;
return;	}else
	{

	goto case 21;	}
	case 21:
	AnimationEnd = AnimationEnd;
	Fox.Walk = true;
	Fox.Sing = false;
	Bird.Sing = false;
	Foreground.RotatingVelocity = -7f;
	Background.RotatingVelocity = -2f;
	s2 = 20;
return;
	case 20:
	if(!(((CurrentCheckpoint.IsSome) && (((1.5f) > (UnityEngine.Vector3.Distance(Fox.Position,CurrentCheckpoint.Value.position)))))))
	{

	s2 = 20;
return;	}else
	{

	goto case 19;	}
	case 19:
	AnimationEnd = AnimationEnd;
	Fox.Walk = false;
	Fox.Sing = false;
	Bird.Sing = false;
	Foreground.RotatingVelocity = 0f;
	Background.RotatingVelocity = 0f;
	s2 = 18;
return;
	case 18:
	if(!(!(Bird.Walk)))
	{

	s2 = 18;
return;	}else
	{

	goto case 17;	}
	case 17:
	AnimationEnd = AnimationEnd;
	Fox.Walk = false;
	Fox.Sing = true;
	Bird.Sing = false;
	Foreground.RotatingVelocity = 0f;
	Background.RotatingVelocity = 0f;
	s2 = 16;
return;
	case 16:
	UnityAudio.Play(CurrentTrack.Value.ItemName);
	count_down4 = ((ClipLength) / (2f));
	goto case 15;
	case 15:
	if(((count_down4) > (0f)))
	{

	count_down4 = ((count_down4) - (dt));
	s2 = 15;
return;	}else
	{

	goto case 13;	}
	case 13:
	AnimationEnd = AnimationEnd;
	Fox.Walk = false;
	Fox.Sing = false;
	Bird.Sing = true;
	Foreground.RotatingVelocity = Foreground.RotatingVelocity;
	Background.RotatingVelocity = Background.RotatingVelocity;
	s2 = 11;
return;
	case 11:
	count_down3 = ((ClipLength) / (2f));
	goto case 12;
	case 12:
	if(((count_down3) > (0f)))
	{

	count_down3 = ((count_down3) - (dt));
	s2 = 12;
return;	}else
	{

	goto case 10;	}
	case 10:
	AnimationEnd = AnimationEnd;
	Fox.Walk = false;
	Fox.Sing = false;
	Bird.Sing = false;
	Foreground.RotatingVelocity = Foreground.RotatingVelocity;
	Background.RotatingVelocity = Background.RotatingVelocity;
	s2 = 9;
return;
	case 9:
	___item21 = CurrentTrack.Value;
	goto case 8;
	case 8:
	if(!(((Button.Yes) || (Button.No))))
	{

	s2 = 8;
return;	}else
	{

	goto case 5;	}
	case 5:
	if(((___item21.Answer) || (RunningTutorial)))
	{

	goto case 3;	}else
	{

	goto case 4;	}
	case 3:
	UnityAudio.Play("cheer");
	s2 = 2;
return;
	case 4:
	UnityAudio.Play("boo");
	s2 = 2;
return;
	case 2:
	if(!(Bird.Walk))
	{

	s2 = 2;
return;	}else
	{

	goto case 1;	}
	case 1:
	if(!(!(Bird.Walk)))
	{

	s2 = 1;
return;	}else
	{

	goto case 0;	}
	case 0:
	AnimationEnd = false;
	Fox.Walk = Fox.Walk;
	Fox.Sing = Fox.Sing;
	Bird.Sing = Bird.Sing;
	Foreground.RotatingVelocity = Foreground.RotatingVelocity;
	Background.RotatingVelocity = Background.RotatingVelocity;
	s2 = -1;
return;	
	default: return;}}
예제 #9
0
	public void Rule0(float dt, World world){ 
	switch (s0)
	{

	case -1:
	if(!(!(RunningTutorial)))
	{

	s0 = -1;
return;	}else
	{

	goto case 7;	}
	case 7:
	if(!(((CurrentTrack.IsSome) && (Fox.Sing))))
	{

	s0 = 7;
return;	}else
	{

	goto case 6;	}
	case 6:
	if(!(Bird.Sing))
	{

	s0 = 6;
return;	}else
	{

	goto case 5;	}
	case 5:
	if(!(!(Bird.Sing)))
	{

	s0 = 5;
return;	}else
	{

	goto case 4;	}
	case 4:
	___t000 = DateTime.Now;
	goto case 3;
	case 3:
	if(!(((((Button.Yes) || (Button.No))) && (!(Bird.Sing)))))
	{

	s0 = 3;
return;	}else
	{

	goto case 2;	}
	case 2:
	___t100 = DateTime.Now;
	___dt00 = ___t100.Subtract(___t000);
	CurrentTrack.Value.Answer = Button.Yes;
	CurrentTrack.Value.ResponceTime = ___dt00.TotalSeconds;
	s0 = -1;
return;	
	default: return;}}
예제 #10
0
	public void Rule1(float dt, World world){ 
	switch (s1)
	{

	case -1:
	count_down10 = 0f;
	goto case 6;
	case 6:
	if(((count_down10) > (0f)))
	{

	count_down10 = ((count_down10) - (dt));
	s1 = 6;
return;	}else
	{

	goto case 2;	}
	case 2:
	if(((UnityEngine.Vector3.Distance(Position,Destination)) > (0.1f)))
	{

	goto case 0;	}else
	{

	goto case 1;	}
	case 0:
	Velocity = ((Destination) - (Position));
	s1 = -1;
return;
	case 1:
	Velocity = Vector3.zero;
	s1 = -1;
return;	
	default: return;}}
예제 #11
0
	public void Rule0(float dt, World world){ 
	switch (s0)
	{

	case -1:
	AnimationIndex = 0;
	AnimationNumber = WalkTextureFrames;
	AnimalTexture = WalkTexture;
	s0 = 18;
return;
	case 18:
	if(!(Walk))
	{

	s0 = 18;
return;	}else
	{

	goto case 10;	}
	case 10:
	if(!(Walk))
	{

	goto case 9;	}else
	{

	goto case 11;	}
	case 11:
	
	counter130 = -1;
	if((((Enumerable.Range(0,((1) + (((((WalkTextureFrames) - (1))) - (0))))).ToList<System.Int32>()).Count) == (0)))
	{

	s0 = 10;
return;	}else
	{

	___i01 = (Enumerable.Range(0,((1) + (((((WalkTextureFrames) - (1))) - (0))))).ToList<System.Int32>())[0];
	goto case 13;	}
	case 13:
	counter130 = ((counter130) + (1));
	if((((((Enumerable.Range(0,((1) + (((((WalkTextureFrames) - (1))) - (0))))).ToList<System.Int32>()).Count) == (counter130))) || (((counter130) > ((Enumerable.Range(0,((1) + (((((WalkTextureFrames) - (1))) - (0))))).ToList<System.Int32>()).Count)))))
	{

	s0 = 10;
return;	}else
	{

	___i01 = (Enumerable.Range(0,((1) + (((((WalkTextureFrames) - (1))) - (0))))).ToList<System.Int32>())[counter130];
	goto case 14;	}
	case 14:
	AnimationIndex = ___i01;
	AnimationNumber = AnimationNumber;
	AnimalTexture = AnimalTexture;
	s0 = 15;
return;
	case 15:
	count_down9 = 0.15f;
	goto case 16;
	case 16:
	if(((count_down9) > (0f)))
	{

	count_down9 = ((count_down9) - (dt));
	s0 = 16;
return;	}else
	{

	s0 = 13;
return;	}
	case 9:
	AnimationIndex = 0;
	AnimationNumber = SingTextureFrames;
	AnimalTexture = SingTexture;
	s0 = 8;
return;
	case 8:
	if(!(Sing))
	{

	s0 = 8;
return;	}else
	{

	goto case 0;	}
	case 0:
	if(!(Sing))
	{

	s0 = -1;
return;	}else
	{

	goto case 1;	}
	case 1:
	
	counter30 = -1;
	if((((Enumerable.Range(0,((1) + (((((SingTextureFrames) - (1))) - (0))))).ToList<System.Int32>()).Count) == (0)))
	{

	s0 = 0;
return;	}else
	{

	___i02 = (Enumerable.Range(0,((1) + (((((SingTextureFrames) - (1))) - (0))))).ToList<System.Int32>())[0];
	goto case 3;	}
	case 3:
	counter30 = ((counter30) + (1));
	if((((((Enumerable.Range(0,((1) + (((((SingTextureFrames) - (1))) - (0))))).ToList<System.Int32>()).Count) == (counter30))) || (((counter30) > ((Enumerable.Range(0,((1) + (((((SingTextureFrames) - (1))) - (0))))).ToList<System.Int32>()).Count)))))
	{

	s0 = 0;
return;	}else
	{

	___i02 = (Enumerable.Range(0,((1) + (((((SingTextureFrames) - (1))) - (0))))).ToList<System.Int32>())[counter30];
	goto case 4;	}
	case 4:
	AnimationIndex = ___i02;
	AnimationNumber = AnimationNumber;
	AnimalTexture = AnimalTexture;
	s0 = 5;
return;
	case 5:
	count_down8 = 0.08f;
	goto case 6;
	case 6:
	if(((count_down8) > (0f)))
	{

	count_down8 = ((count_down8) - (dt));
	s0 = 6;
return;	}else
	{

	s0 = 3;
return;	}	
	default: return;}}
예제 #12
0
	public void Rule2(float dt, World world) 
	{
	Position = (Position) + ((Velocity) * (dt));
	}
예제 #13
0
	public void Update(float dt, World world) {
var t = System.DateTime.Now;

		Bird.Update(dt, world);
		Button.Update(dt, world);
if(CurrentCheckpoint.IsSome){  } 
if(CurrentTrack.IsSome){  } 
		Fox.Update(dt, world);
		PauseButton.Update(dt, world);
if(PauseMenu.IsSome){ 		PauseMenu.Value.Update(dt, world);
 } 
		this.Rule0(dt, world);
		this.Rule1(dt, world);
		this.Rule2(dt, world);
		this.Rule3(dt, world);
		this.Rule4(dt, world);
		this.Rule5(dt, world);
	}
예제 #14
0
	public void Update(float dt, World world) {
frame = World.frame;



	}
예제 #15
0
	public void Rule0(float dt, World world){ 
	switch (s0)
	{

	case -1:
	Texture = "PauseButton";
	Pressed = false;
	s0 = 3;
return;
	case 3:
	if(!(((UnityEngine.Input.GetMouseButtonDown(0)) && (IsPausePressed))))
	{

	s0 = 3;
return;	}else
	{

	goto case 2;	}
	case 2:
	Texture = "PauseButton_down";
	Pressed = true;
	s0 = 0;
return;
	case 0:
	count_down7 = 0.1f;
	goto case 1;
	case 1:
	if(((count_down7) > (0f)))
	{

	count_down7 = ((count_down7) - (dt));
	s0 = 1;
return;	}else
	{

	s0 = -1;
return;	}	
	default: return;}}