コード例 #1
0
ファイル: Core.cs プロジェクト: tanis2000/Futile
        public Core()
        {
            instance = this;

            AddChild (pageContainer = new FContainer ());
            AddChild (topEffectManager = new EffectManager (true));

            audioManager = new AudioManager ();
            FXPlayer.manager = audioManager.fxManager;
            MusicPlayer.manager = audioManager.musicManager;
            FXPlayer.Preload ();

            playerManager = new PlayerManager ();

            playerManager.Setup ();

            Engine engine = new Engine();
            engine.Initialize();
            ShowPage (engine);
            Engine.Scene = new MainScene();

            ListenForUpdate (Update);
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: tanis2000/Futile
        private void Start()
        {
            instance = this;

            Go.defaultEaseType = GoEaseType.Linear;
            Go.duplicatePropertyRule = GoDuplicatePropertyRuleType.RemoveRunningProperty;

            //Time.timeScale = 0.1f;

            bool isIPad = SystemInfo.deviceModel.Contains ("iPad");

            bool shouldSupportPortraitUpsideDown = isIPad; //only support portrait upside-down on iPad

            FutileParams fparams = new FutileParams (true, true, false, shouldSupportPortraitUpsideDown);

            fparams.backgroundColor = RXUtils.GetColorFromHex (0x111111);
            fparams.shouldLerpToNearestResolutionLevel = false;
            fparams.resolutionLevelPickMode = FResolutionLevelPickMode.Downwards;

            fparams.AddResolutionLevel (320.0f, 1.0f, 1.0f, "");
            fparams.AddResolutionLevel (640.0f, 2.0f, 1.0f, "");
            fparams.AddResolutionLevel (960.0f, 3.0f, 1.0f, "");
            fparams.AddResolutionLevel (1280.0f, 4.0f, 1.0f, "");

            fparams.origin = new Vector2 (0.5f, 0.5f);

            Futile.instance.Init (fparams);

            FFacetType.Quad.maxEmptyAmount = 100;
            FFacetType.Quad.expansionAmount = 100;
            FFacetType.Quad.initialAmount = 100;

            FAtlas mainAtlas = Futile.atlasManager.LoadAtlas ("Atlases/MainAtlas");
            mainAtlas.texture.filterMode = FilterMode.Point;

            Fonts.Load ();

            Config.Setup ();

            //Wolf.WolfAnimation.SetupAnimations ();
            //Human.HumanAnimation.SetupAnimations ();

            core = new Core ();
            Futile.stage.AddChild (core);

            Futile.screen.SignalResize += HandleSignalResize;
            HandleSignalResize (false);
        }