FSceneManager
SceneManager for Futile, a Unity framework.
todo
- Complete loading of tilemaps. Data and tilesets are loaded, but tilelayers are incomplete.
- Add transitions for switching scenes.
- Switch Virtual functions to Actions
how-to example
Game.cs
FSceneManager.Instance.SetScene(new SceneStartup());
SceneStartup.cs
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class SceneStartup : FScene
{
FLayer mLayer;
public SceneStartup()
{
mPaused = false;
mLayer = new LayerStartup(this);
this.AddChild(mLayer);
}
}
LayerStartup.cs
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class LayerStartup : FLayer
{
public LayerStartup(FScene _parent) : base(_parent)
{
}
override public void OnEnter()
{
}
override public void OnUpdate()
{
if(mParent.Paused)
return;
FSceneManager.Instance.SetScene(new SceneGame());
}
override public void OnExit()
{
}
}
Thanks
- @MattRix [https://github.com/MattRix] - Awesome Futile framework
- @ironpencil [https://github.com/ironpencil] - Idea's on how to improve FSceneManager
- @jfleschler [https://github.com/jfleschler] - Code to load Tilemap Atlases