Added in fade commands for event helper.
This commit is contained in:
parent
f5db7501f4
commit
7c8d0bc6bd
|
@ -21,7 +21,8 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
conditions.Add(new LocationPrecondition(Game1.getLocationFromName("CommunityCenter")));
|
||||
conditions.Add(new TimePrecondition(600, 2600));
|
||||
EventHelper e = new EventHelper("CommunityCenterBirthday",19950, conditions, new EventStartData(EventStartData.MusicToPlayType.Continue, 10, 10, new EventStartData.FarmerData(10, 10, EventHelper.FacingDirection.Up),new List<EventStartData.NPCData>()));
|
||||
|
||||
e.setViewportPosition(10, 10);
|
||||
e.globalFadeIn();
|
||||
e.showMessage("Community center birthday here.");
|
||||
e.end();
|
||||
|
||||
|
|
|
@ -1024,6 +1024,13 @@ namespace Omegasis.HappyBirthday.Framework.Events
|
|||
this.add(b);
|
||||
}
|
||||
|
||||
public virtual void fadeIn()
|
||||
{
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.Append("fade");
|
||||
this.add(b);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes the farmer eat an object.
|
||||
/// </summary>
|
||||
|
@ -1057,13 +1064,21 @@ namespace Omegasis.HappyBirthday.Framework.Events
|
|||
/// Fade to black at a particular speed (default 0.007). If no speed is specified, the event will continue immediately; otherwise, it will continue after the fade is finished. The fade effect disappears when this command is done; to avoid that, use the viewport command to move the camera off-screen.
|
||||
/// </summary>
|
||||
/// <param name="speed"></param>
|
||||
public virtual void globalFade(double speed)
|
||||
public virtual void globalFadeOut(double speed=0.007)
|
||||
{
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.Append("globalFade ");
|
||||
b.Append(speed);
|
||||
this.add(b);
|
||||
}
|
||||
|
||||
public virtual void globalFadeIn(double speed=0.007)
|
||||
{
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.Append("globalFadeToClear ");
|
||||
b.Append(speed);
|
||||
this.add(b);
|
||||
}
|
||||
/// <summary>
|
||||
/// Fade to clear (unfade?) at a particular speed (default 0.007). If no speed is specified, the event will continue immediately; otherwise, it will continue after the fade is finished.
|
||||
/// </summary>
|
||||
|
@ -1619,6 +1634,8 @@ namespace Omegasis.HappyBirthday.Framework.Events
|
|||
b.Append(XPosition);
|
||||
b.Append(" ");
|
||||
b.Append(YPosition);
|
||||
b.Append(" ");
|
||||
b.Append("true");
|
||||
this.add(b);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue