// Use this for initialization void Start() { FutileParams futileParams = new FutileParams(true, false, false, false); futileParams.AddResolutionLevel(160, 1.0f, 1.0f, ""); futileParams.origin = new Vector2(0.5f, 0.5f); futileParams.backgroundColor = new Color(0.494f, 0.561f, 0.639f); Futile.instance.Init(futileParams); Futile.atlasManager.LoadAtlas("Atlases/atlasOne"); Futile.atlasManager.LoadFont("gameFont", "fontOne_0", "Atlases/fontOne", 0, 0); eventQueue = new List <Event>(); GlitchManager gManager = GlitchManager.getInstance(); camera = Ym90_GUI.getInstance(); player = new Player(); currentMap = new Map(); currentMap.setPlayer(player); loadMap("testMap"); loadingScreen = new LoadingScreen(); camera.setLoadingScreen(loadingScreen); camera.follow(player); Futile.stage.AddChild(camera); }
public static GlitchManager getInstance() { if (glitchManager == null) { glitchManager = new GlitchManager(); } return(glitchManager); }
//0.01, 0.02, 0.005, 0.015 void Awake() { if (instance != null && instance != this) { Destroy (gameObject); } instance = this; DontDestroyOnLoad (gameObject); }
//0.01, 0.02, 0.005, 0.015 void Awake() { if (instance != null && instance != this) { Destroy(gameObject); } instance = this; DontDestroyOnLoad(gameObject); }
private void test() { List <string> convo = new List <string>(); convo.Add("Hello!"); convo.Add(".... Goodbye"); FConvo convoOne = new FConvo(convo); eventQueue.Add(new Event(new List <EventAction>() { new Action_MoveCamera(200, -300, 4.0f), new Action_ShowConvo(new FConvo(convo)), new Action_FollowNode(player, 3.0f), new Action_CustomAction(() => { GlitchManager.getInstance().glitchToNext(); }) })); }
private void showCorrectGlitchLevel() { int currentLevel = GlitchManager.getInstance().CurrentLevel; this.isVisible = false; foreach (FTilemap f in otherTilemaps) { f.isVisible = false; } if (currentLevel == 0) { this.isVisible = true; } else { otherTilemaps[currentLevel - 1].isVisible = true; } }
private void showCurrentLevel() { int currentLevel = Math.Min(maxLevel - 1, GlitchManager.getInstance().CurrentLevel); this.isVisible = false; foreach (FAnimatedSprite sprite in otherAnims) { sprite.isVisible = false; } if (currentLevel == 0) { this.isVisible = true; } else { otherAnims[currentLevel - 1].isVisible = true; } }
void Awake() { //Check if there is already an instance of SoundManager if (instance == null) { //if not, set it to this. instance = this; } //If instance already exists: else if (instance != this) { //Destroy this, this enforces our singleton pattern so there can only be one instance of SoundManager. Destroy(gameObject); } AnalogGlitch ag = GetComponent <AnalogGlitch>(); baseScanLineJitter = ag.scanLineJitter; baseVerticalJump = ag.verticalJump; baseHorizontalShake = ag.horizontalShake; baseDolorDrift = ag.colorDrift; }