Exemple #1
0
    private void Start()
    {
        instance = this;

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

        //Time.timeScale = 0.4f;
        // ======= FUTILE INIT ======= //
        FutileParams fparams = new FutileParams(true, true, false, false);

        fparams.AddResolutionLevel(480.0f, 1.0f, 1.0f, "_Scale1");                  //iPhone
        fparams.AddResolutionLevel(960.0f, 2.0f, 2.0f, "_Scale2");                  //iPhone retina
        fparams.AddResolutionLevel(1280.0f, 2.0f, 2.0f, "_Scale2");                 //Nexus 7

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

        Futile.instance.Init(fparams);

        Futile.atlasManager.LoadAtlas("Atlases/BananaLargeAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/BananaGameAtlas");

        Futile.atlasManager.LoadFont("Franchise", "FranchiseFont" + Futile.resourceSuffix, "Atlases/FranchiseFont" + Futile.resourceSuffix, 0.0f, -4.0f);
        // ======= ENVIRONMENT INIT ======= //
        _stage = Futile.stage;

        FSoundManager.PlayMusic("NormalMusic", 0.5f);

        // ======= GAME INIT ======= //
        bad_foods.AddRange(new string[] { "Banana" });

        // ======= SWITCH PAGE ======= //
//        GoToPage(BPageType.TitlePage);
        GoToPage(BPageType.SelectPage);
    }
Exemple #2
0
    private void Start()
    {
        instance = this;

        Go.defaultEaseType = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.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,true,shouldSupportPortraitUpsideDown);

        fparams.AddResolutionLevel(480.0f,	1.0f,	1.0f,	"_Scale1"); //iPhone
        fparams.AddResolutionLevel(960.0f,	2.0f,	2.0f,	"_Scale2"); //iPhone retina
        fparams.AddResolutionLevel(1024.0f,	2.0f,	2.0f,	"_Scale2"); //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/BananaLargeAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/BananaGameAtlas");
        Futile.atlasManager.LoadFont("Franchise","FranchiseFontAtlas.png", "Atlases/FranchiseLarge");

        _stage = Futile.stage;

        BSoundPlayer.PlayRegularMusic();

        GoToPage(BPageType.TitlePage);
    }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        BMain bMain = new BMain();

        bMain.MainMethod            = new BMethod();
        bMain.MainMethod.ReturnType = typeof(int);
        Belong.Logic.Utils.SerializedUtils.SerializeObject(bMain);
    }
Exemple #4
0
    private FStage _stage;              //保存FStage引用

    private void Start()
    {
        instance = this;

        Go.defaultEaseType       = EaseType.Linear;
        Go.duplicatePropertyRule = DuplicatePropertyRuleType.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, true, shouldSupportPortraitUpsideDown);

        fparams.AddResolutionLevel(480.0f, 1.0f, 1.0f, "_Scale1");                  //iPhone
        fparams.AddResolutionLevel(960.0f, 2.0f, 2.0f, "_Scale2");                  //iPhone retina
        fparams.AddResolutionLevel(1024.0f, 2.0f, 2.0f, "_Scale2");                 //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引擎
        Futile.instance.Init(fparams);

        //加载图集、字体资源
        Futile.atlasManager.LoadAtlas("Atlases/BananaLargeAtlas");
        Futile.atlasManager.LoadAtlas("Atlases/BananaGameAtlas");

        Futile.atlasManager.LoadFont("Franchise", "FranchiseFont" + Futile.resourceSuffix, "Atlases/FranchiseFont" + Futile.resourceSuffix, 0.0f, -4.0f);

        //获取FStage引用
        _stage = Futile.stage;

        FSoundManager.PlayMusic("NormalMusic", 0.5f);

        GoToPage(BPageType.TitlePage);
    }
Exemple #5
0
 private void Awake()
 {
     _instance    = this;
     _currentMain = Utils.SerializedUtils.DeserializeObject <BMain>();
     DontDestroyOnLoad(this.gameObject);
 }