示例#1
0
文件: Game.cs 项目: riktothepast/LD29
    void Start()
    {
        instance                 = this;
        Go.defaultEaseType       = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
        FutileParams fparams = new FutileParams(true, true, false, false);

        fparams.AddResolutionLevel(960.0f, 1.0f, 1.0f, "");                  //iPhone

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

        fparams.backgroundColor = new Color(18f / 100f, 13f / 100f, 28f / 100f, 1f);

        Futile.instance.Init(fparams);

        Futile.atlasManager.LoadImage("Atlases/Font");
        Futile.atlasManager.LoadImage("Atlases/title");
        Futile.atlasManager.LoadImage("Atlases/bg");

        Futile.atlasManager.LoadAtlas("Atlases/SpriteSheet");
        Futile.atlasManager.LoadFont("Minecraftia", "Atlases/Font", "Atlases/Font", 0, 0);


        _stage = Futile.stage;

        GoToPage(PageType.MainMenuPage);

        _stage.ListenForUpdate(HandleUpdate);
    }
    void Start()
    {
        RXDebug.Log("Starting the demo");
        instance                 = this;
        Go.defaultEaseType       = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
        FutileParams fparams = new FutileParams(true, true, false, false);

        fparams.AddResolutionLevel(480.0f, 1.0f, 1.0f, "");                //iPhone
//		fparams.AddResolutionLevel(960.0f,	2.0f,	2.0f,	"_Scale2"); //iPhone retina
        fparams.AddResolutionLevel(1024.0f, 1.0f, 1.0f, "");               //iPad
//		fparams.AddResolutionLevel(1280.0f,	2.0f,	2.0f,	"_Scale2"); //Nexus 7
//		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/SFB");
        Futile.atlasManager.LoadAtlas("Atlases/SFB_en");

        Futile.atlasManager.LoadFont("font", "font", "Atlases/font", 0, 0);


        _stage = Futile.stage;

        GoToPage(PageType.MenuPage);

        _stage.ListenForUpdate(HandleUpdate);
    }
示例#3
0
    void Start()
    {
        instance = this;
        GameTime = 0.0f;

        Go.defaultEaseType       = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;

        bool landscape = true;
        bool portrait  = false;

        // iOS support later!
        bool isIPad = SystemInfo.deviceModel.Contains("iPad");
        bool shouldSupportPortraitUpsideDown = isIPad && portrait;         //only support portrait upside-down on iPad

        FutileParams fparams = new FutileParams(landscape, landscape, portrait, shouldSupportPortraitUpsideDown);

        fparams.backgroundColor = Color.grey;         //new Color(0.0745f,0.0745f,0.0745f,1.0f); // RXColor.GetColorFromHex(0x74CBFF); //light blue 0x94D7FF or 0x74CBFF

        fparams.AddResolutionLevel(1280.0f, 1.0f, 1.0f, "");

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

        Futile.instance.Init(fparams);

        Futile.atlasManager.LoadAtlas("Atlases/GameAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/LevelAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/BackgroundAtlas");
        //Futile.atlasManager.LoadAtlas("Atlases/FontAtlas");
        //Futile.atlasManager.LoadAtlas("Atlases/BackgroundAtlas");
        //Futile.atlasManager.LoadFont("emulogic64", "emulogic64", "Atlases/FontAtlas", 0, 0);
        Futile.atlasManager.LoadFont("Emulogic", "emulogic", "Atlases/emulogic", 0, 0);

        //FLabel test = new FLabel("Emulogic", "Hello World");

        _stage = Futile.stage;
        //_stage.AddChild(test);

        GoToPage(PageType.TitlePage);

        _stage.ListenForUpdate(HandleUpdate);
        _stage.ListenForResize(HandleResize);
    }
示例#4
0
    private void Start()
    {
        instance = this;

        Go.defaultEaseType = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;

        //Screen.showCursor = false;

        //Time.timeScale = 0.1f;

        bool landscape = true;
        bool portrait = false;

        bool isIPad = SystemInfo.deviceModel.Contains("iPad");
        bool shouldSupportPortraitUpsideDown = isIPad && portrait; //only support portrait upside-down on iPad

        FutileParams fparams = new FutileParams(landscape, landscape, portrait, shouldSupportPortraitUpsideDown);

        fparams.backgroundColor = RXUtils.GetColorFromHex(0x000000); //light blue 0x94D7FF or 0x74CBFF

        //fparams.AddResolutionLevel(2560.0f,	2.0f,	2.0f,	""); //1280x720
        //fparams.AddResolutionLevel(1280.0f,	1.0f,	2.0f,	""); //1280x720
        fparams.AddResolutionLevel(1920.0f,	1.5f,	2.0f,	""); //1920x1080
        fparams.AddResolutionLevel(960.0f,	0.75f,	2.0f,	""); //960x540

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

        Futile.instance.Init (fparams);

        Futile.atlasManager.LoadAtlas("Atlases/UIAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/UIFonts");
        Futile.atlasManager.LoadAtlas("Atlases/BackgroundAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/GameAtlas");

        FTextParams textParams;

        textParams = new FTextParams();
        textParams.lineHeightOffset = -8.0f;
        Futile.atlasManager.LoadFont("Franchise","FranchiseFont", "Atlases/FranchiseFont", -2.0f,-5.0f,textParams);

        textParams = new FTextParams();
        textParams.kerningOffset = -0.5f;
        textParams.lineHeightOffset = -8.0f;
        Futile.atlasManager.LoadFont("CubanoInnerShadow","Cubano_InnerShadow", "Atlases/CubanoInnerShadow", 0.0f,2.0f,textParams);

        textParams = new FTextParams();
        textParams.lineHeightOffset = -8.0f;
        textParams.kerningOffset = -0.5f;
        Futile.atlasManager.LoadFont("CubanoBig","Cubano136", "Atlases/Cubano136", 0.0f,2.0f,textParams);

        GamepadManager.Init();
        GameManager.Init();

        _stage = Futile.stage;

        _stage.AddChild(background = new Background());

        GoToPage(TPageType.PagePlayerSelect);

        _stage.ListenForUpdate (HandleUpdate);

        FSoundManager.isMuted = !GameConfig.IS_SOUND_ON;

        _stage.ListenForResize(HandleResize);
    }
    void Start()
    {
        RXDebug.Log("Starting the demo");
        instance = this;
        Go.defaultEaseType = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
        FutileParams fparams = new FutileParams(true,true, false,false);

        fparams.AddResolutionLevel(480.0f,	1.0f,	1.0f, ""); //iPhone
        //		fparams.AddResolutionLevel(960.0f,	2.0f,	2.0f,	"_Scale2"); //iPhone retina
        fparams.AddResolutionLevel(1024.0f,	1.0f,	1.0f,	""); //iPad
        //		fparams.AddResolutionLevel(1280.0f,	2.0f,	2.0f,	"_Scale2"); //Nexus 7
        //		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/SFB");
                Futile.atlasManager.LoadAtlas("Atlases/SFB_en");

                Futile.atlasManager.LoadFont("font", "font", "Atlases/font", 0, 0);

        _stage = Futile.stage;

         GoToPage(PageType.MenuPage);

        _stage.ListenForUpdate (HandleUpdate);
    }
示例#6
0
文件: Game.cs 项目: riktothepast/LD29
    void Start()
    {
        instance = this;
        Go.defaultEaseType = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
        FutileParams fparams = new FutileParams(true, true, false, false);

        fparams.AddResolutionLevel(960.0f,	1.0f,	1.0f,	""); //iPhone

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

        fparams.backgroundColor = new Color(18f / 100f, 13f / 100f, 28f / 100f, 1f);

        Futile.instance.Init (fparams);

        Futile.atlasManager.LoadImage("Atlases/Font");
        Futile.atlasManager.LoadImage("Atlases/title");
        Futile.atlasManager.LoadImage("Atlases/bg");

        Futile.atlasManager.LoadAtlas("Atlases/SpriteSheet");
        Futile.atlasManager.LoadFont("Minecraftia", "Atlases/Font", "Atlases/Font", 0, 0);

        _stage = Futile.stage;

        GoToPage(PageType.MainMenuPage);

        _stage.ListenForUpdate (HandleUpdate);
    }
示例#7
0
文件: Main.cs 项目: jrendel/LD27
    void Start()
    {
        instance = this;
        GameTime = 0.0f;

        Go.defaultEaseType = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;

        bool landscape = true;
        bool portrait = false;

        // iOS support later!
        bool isIPad = SystemInfo.deviceModel.Contains("iPad");
        bool shouldSupportPortraitUpsideDown = isIPad && portrait; //only support portrait upside-down on iPad

        FutileParams fparams = new FutileParams(landscape, landscape, portrait, shouldSupportPortraitUpsideDown);

        fparams.backgroundColor = Color.grey; //new Color(0.0745f,0.0745f,0.0745f,1.0f); // RXColor.GetColorFromHex(0x74CBFF); //light blue 0x94D7FF or 0x74CBFF

        fparams.AddResolutionLevel(1280.0f, 1.0f, 1.0f, "");

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

        Futile.instance.Init (fparams);

        Futile.atlasManager.LoadAtlas("Atlases/GameAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/LevelAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/BackgroundAtlas");
        //Futile.atlasManager.LoadAtlas("Atlases/FontAtlas");
        //Futile.atlasManager.LoadAtlas("Atlases/BackgroundAtlas");
        //Futile.atlasManager.LoadFont("emulogic64", "emulogic64", "Atlases/FontAtlas", 0, 0);
        Futile.atlasManager.LoadFont("Emulogic", "emulogic", "Atlases/emulogic", 0, 0);

        //FLabel test = new FLabel("Emulogic", "Hello World");

        _stage = Futile.stage;
        //_stage.AddChild(test);

        GoToPage(PageType.TitlePage);

        _stage.ListenForUpdate(HandleUpdate);
        _stage.ListenForResize(HandleResize);
    }