void Start() { instance = this; FutileParams fparams = new FutileParams(true, true, false, false); fparams.AddResolutionLevel(1280.0f, 1.0f, 1.0f, ""); fparams.origin = new Vector2(0.5f, 0.5f); Futile.instance.Init(fparams); Futile.atlasManager.LoadAtlas("Atlases/CombatAtlas"); Futile.atlasManager.LoadAtlas("Atlases/stomach_atlas"); Futile.atlasManager.LoadAtlas("Atlases/lung_background"); Futile.atlasManager.LoadAtlas("Atlases/lung_layers"); Futile.atlasManager.LoadAtlas("Atlases/lung_dust"); Futile.atlasManager.LoadAtlas("Atlases/BrainAtlas"); Futile.atlasManager.LoadAtlas("Atlases/neuron_fast_80_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_fast_60_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_fast_40_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_slow_80_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_slow_60_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_slow_40_animation"); Futile.atlasManager.LoadAtlas("Atlases/Victory-DefeatAtlas"); FSoundManager.PreloadSound("player_hit"); FSoundManager.PreloadSound("bacteria_pop"); Futile.atlasManager.LogAllElementNames(); stage_ = Futile.stage; camera_ = new FCamObject(); stage_.AddChild(camera_); //Rect worldBounds = stage.worldBounds; //camera_.setWorldBounds (worldBounds); //camera_.setBounds(stage.cameraBounds); gamePage = new CombatPage(); gamePage.Start(); camera_.AddChild(gamePage); }
override public void Start() { // Access immunity menu immunityMenu = GameObject.Find("Futile").GetComponent <ImmunityMenu>(); // Sound FSoundManager.StopMusic(); FSoundManager.UnloadAllSoundsAndMusic(); FSoundManager.PlayMusic("background_music"); FSoundManager.PreloadSound("button_click"); // GUI objects background_ = new FSprite("start screen final"); play_button = new FButton("Play", "PlayPressed"); how_to_play_button = new FButton("how_to_play", "how_to_play_pressed"); credits_button = new FButton("Credits", "CreditsPressed"); // Add objects to stage AddChild(background_); AddChild(play_button); AddChild(how_to_play_button); AddChild(credits_button); // Scale and set position background_.scale = 0.0f; play_button.scale = .6f; play_button.x = Futile.screen.halfWidth * .3f; play_button.y = Futile.screen.halfHeight * .1f; how_to_play_button.x = Futile.screen.halfWidth * .45f; how_to_play_button.y = Futile.screen.halfHeight * -.3f; credits_button.scale = .6f; credits_button.x = Futile.screen.halfWidth * .35f; credits_button.y = Futile.screen.halfHeight * -.7f; // Set button delegates play_button.SignalRelease += HandlePlayButton; how_to_play_button.SignalRelease += HandleHowToPlayButton; credits_button.SignalRelease += HandleCreditsButton; Go.to(background_, 0.5f, new TweenConfig().setDelay(0.1f).floatProp("scale", 1.0f).setEaseType(EaseType.BackOut)); }
private void Start() { Go.defaultEaseType = EaseType.Linear; Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty; // Uncomment if you need to delete bad save data on startup // PlayerPrefs.DeleteAll(); //Time.timeScale = 0.1f; //use for checking timings of things in slow motion FutileParams fparams = new FutileParams(true, true, false, false); fparams.backgroundColor = RXUtils.GetColorFromHex(0x050122); fparams.shouldLerpToNearestResolutionLevel = false; fparams.resolutionLevelPickMode = FResolutionLevelPickMode.Closest; bool shouldHaveScale1 = true; bool shouldHaveScale2 = true; bool shouldHaveScale4 = true; #if UNITY_WEBPLAYER //webplayer has everything but scale2 stripped out shouldHaveScale1 = false; shouldHaveScale4 = false; #endif if (shouldHaveScale1) { fparams.AddResolutionLevel(480.0f, 1.0f, 1.0f, "_Scale1"); //iPhone } if (shouldHaveScale2) { fparams.AddResolutionLevel(960.0f, 2.0f, 2.0f, "_Scale2"); //iPhone retina } if (shouldHaveScale2) { fparams.AddResolutionLevel(1024.0f, 2.0f, 2.0f, "_Scale2"); //iPad } if (shouldHaveScale2) { fparams.AddResolutionLevel(1136.0f, 2.0f, 2.0f, "_Scale2"); //iPhone 5 retina } if (shouldHaveScale2) { fparams.AddResolutionLevel(1280.0f, 2.0f, 2.0f, "_Scale2"); //Nexus 7 } if (shouldHaveScale4) { fparams.AddResolutionLevel(2048.0f, 4.0f, 4.0f, "_Scale4"); //iPad Retina } //FOR SCREENSHOTS // if(shouldHaveScale1) fparams.AddResolutionLevel(480.0f, 1.0f, 2.0f, "_Scale2"); //iPhone // if(shouldHaveScale2) fparams.AddResolutionLevel(960.0f, 2.0f, 2.0f, "_Scale2"); //iPhone retina // if(shouldHaveScale2) fparams.AddResolutionLevel(1024.0f, 2.0f, 4.0f, "_Scale4"); //iPad // if(shouldHaveScale2) fparams.AddResolutionLevel(1136.0f, 2.0f, 4.0f, "_Scale4"); //iPhone 5 retina // if(shouldHaveScale2) fparams.AddResolutionLevel(1280.0f, 2.0f, 4.0f, "_Scale4"); //Nexus 7 // if(shouldHaveScale4) fparams.AddResolutionLevel(2048.0f, 4.0f, 4.0f, "_Scale4"); //iPad Retina fparams.origin = new Vector2(0.5f, 0.5f); Futile.instance.Init(fparams); Futile.atlasManager.LoadAtlas("Atlases/MainAtlas"); //Futile.atlasManager.LoadImage("Atlases/Fonts/Raleway"); //Futile.atlasManager.LoadImage("Atlases/Fonts/Ostrich"); FTextParams textParams; textParams = new FTextParams(); textParams.kerningOffset = -0.0f; textParams.lineHeightOffset = -15.0f; Futile.atlasManager.LoadFont("Raleway", "Fonts/Raleway" + Futile.resourceSuffix, "Atlases/Fonts/Raleway" + Futile.resourceSuffix, -1.0f, -1.0f, textParams); // // textParams = new FTextParams(); // textParams.kerningOffset = -0.0f; // textParams.lineHeightOffset = -15.0f; // Futile.atlasManager.LoadFont("Ostrich","Atlases/Fonts/Ostrich", "Atlases/Fonts/Ostrich"+Futile.resourceSuffix, 0.0f,-2.0f,textParams); // for (int s = 0; s < 10; s++) { FSoundManager.PreloadSound("Musical/Note" + s + "_bass"); FSoundManager.PreloadSound("Musical/Note" + s + "_normal"); } Futile.stage.AddChild(new Keeper()); //keeper statically retains itself and never gets removed }
void Start() { instance = this; FutileParams fparams = new FutileParams(true, true, false, false); fparams.AddResolutionLevel(1280.0f, 1.0f, 1.0f, ""); fparams.origin = new Vector2(0.5f, 0.5f); Futile.instance.Init(fparams); Futile.atlasManager.LoadAtlas("Atlases/HuroCombatAtlas"); Futile.atlasManager.LoadAtlas("Atlases/EnemyCombatAtlas"); if (stage_name.Equals("stomach")) { Futile.atlasManager.LoadAtlas("Atlases/StomachAtlas1"); Futile.atlasManager.LoadAtlas("Atlases/StomachAtlas2"); } else if (stage_name.Equals("lung")) { Futile.atlasManager.LoadAtlas("Atlases/LungBackground1"); Futile.atlasManager.LoadAtlas("Atlases/LungBackground2"); Futile.atlasManager.LoadAtlas("Atlases/LungBackground3"); Futile.atlasManager.LoadAtlas("Atlases/LungBackground4"); Futile.atlasManager.LoadAtlas("Atlases/LungBackground5"); Futile.atlasManager.LoadAtlas("Atlases/lung_layers"); Futile.atlasManager.LoadAtlas("Atlases/DustRear"); Futile.atlasManager.LoadAtlas("Atlases/DustMid"); Futile.atlasManager.LoadAtlas("Atlases/DustFore"); } else { Futile.atlasManager.LoadAtlas("Atlases/BrainAtlas"); Futile.atlasManager.LoadAtlas("Atlases/neuron_fast_80_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_fast_60_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_fast_40_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_slow_80_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_slow_60_animation"); Futile.atlasManager.LoadAtlas("Atlases/neuron_slow_40_animation"); } Futile.atlasManager.LoadAtlas("Atlases/MenuWords"); Futile.atlasManager.LoadAtlas("Atlases/VictoryDefeatAtlas"); FSoundManager.PreloadSound("player_hit"); FSoundManager.PreloadSound("bacteria_pop"); FSoundManager.PreloadSound("enemy_hit"); Futile.atlasManager.LogAllElementNames(); stage_ = Futile.stage; camera_ = new FCamObject(); stage_.AddChild(camera_); //Rect worldBounds = stage.worldBounds; //camera_.setWorldBounds (worldBounds); //camera_.setBounds(stage.cameraBounds); gamePage = new CombatPage(); gamePage.Start(); camera_.AddChild(gamePage); }