Skip to content

Commit

Permalink
Invert immediate & crossfade transition
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jun 2, 2019
1 parent 04ea63a commit e8e8f0c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

game
.vscode
debug.txt
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
Expand Down
Binary file modified Assets/_scenes/main.unity
Binary file not shown.
12 changes: 6 additions & 6 deletions Assets/scripts/SEGMent/LoadJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public void Load(string json, Player player)
foreach(var trans in game.Transitions)
{
int? trans_id = null;
bool do_fade = trans.Fade != 0;
bool is_immediate = trans.Fade == 0;
switch(trans.Transition.Which)
{
case "SceneToScene":
Expand All @@ -372,7 +372,7 @@ public void Load(string json, Player player)
trans_id = rooms.CreateStateObjectSolutionTransition(
source.id
, target.id
, do_fade, false);
, is_immediate, false);
break;
}
case "Text":
Expand All @@ -397,15 +397,15 @@ public void Load(string json, Player player)
, t.Riddle.Text.Question
, solutions
, wrong_answers
, t.Riddle.Text.UseStars, do_fade, false);
, t.Riddle.Text.UseStars, is_immediate, false);
break;
}
case "Puzzle":
{
trans_id = rooms.CreatePuzzleSolutionTransition(
source.id
, target.id
, do_fade, false);
, is_immediate, false);

break;
}
Expand All @@ -425,7 +425,7 @@ public void Load(string json, Player player)
trans_id = rooms.CreateClickableTransition(
source.scene.id, target.id
, itemBox(source.Pos, source.Size, source.scene)
, do_fade, false);
, is_immediate, false);
break;
}
case "ClickAreaToScene":
Expand All @@ -437,7 +437,7 @@ public void Load(string json, Player player)
trans_id = rooms.CreateClickableTransition(
source.scene.id, target.id
, itemBox(source.Pos, source.Size, source.scene)
, do_fade, false);
, is_immediate, false);
break;
}
case "GifToScene":
Expand Down
4 changes: 0 additions & 4 deletions debug.txt

This file was deleted.

0 comments on commit e8e8f0c

Please sign in to comment.