示例#1
0
文件: Game.cs 项目: cuongdv/wushi2
    public void StartNewGame(E_GameDifficulty difficulty)
    {
        ClearInstances();

        _GameType = E_GameType.SinglePlayer;

        Save_Clear();
        Save_Load();
        ClearStatistics();


        GameDifficulty = difficulty;

        Money = 0;


        // Debug.Log("start new game - first " + FirstTimePlayer);
        if (FirstTimePlayer)
        {
            _GameType = E_GameType.FirstTimeTutorial;
            PlayerPrefs.SetInt("firstTime", 1);

            CurrentLevel = "tutorial";
            Application.LoadLevel("empty");
            Application.LoadLevel(CurrentLevel);
        }
        else
        {
            CurrentLevel = "Comics01";
            Application.LoadLevel("empty");
            Application.LoadLevel(CurrentLevel);
        }
    }
示例#2
0
 public static void FlurryLogEndOfMission(E_GameType gameType, E_GameDifficulty difficulty, int level)
 {
     if (Application.platform != RuntimePlatform.OSXEditor)
     {
         _FlurryLogEndOfMission(gameType.ToString() + "-" + difficulty.ToString() + "-" + level);
     }
 }
示例#3
0
 public static void FlurryLogStartGame(E_GameType gameType, E_GameDifficulty diff)
 {
     if (Application.platform != RuntimePlatform.OSXEditor)
     {
         _FlurryLogStartGame(gameType.ToString(), diff.ToString());
     }
 }
示例#4
0
    public void StartTutorial()
    {
        _GameType  = E_GameType.Tutorial;
        _GameState = E_GameState.Tutorial;

        CurrentLevel = "tutorial";

        StartCoroutine(LoadScene(CurrentLevel, false));
    }
示例#5
0
    public void StartNewMultiplayerGame(IPEndPoint EndPoint,
                                        int joinRequestId,
                                        Client.ConnectToServerFailedDelegate onConnectToServerFailed = null)
    {
        _GameType = E_GameType.Multiplayer;

        Instantiate(Client);

        Client.Instance.ConnectToServer(EndPoint, joinRequestId, onConnectToServerFailed);
    }
示例#6
0
    public void StartNewMultiplayerGame(uLink.HostData hostData,
                                        int joinRequestId,
                                        Client.ConnectToServerFailedDelegate onConnectToServerFailed = null)
    {
        _GameType = E_GameType.Multiplayer;

        Instantiate(Client);

        Client.Instance.ConnectToServer(hostData, joinRequestId, onConnectToServerFailed);
    }
示例#7
0
文件: Game.cs 项目: cuongdv/wushi2
    public void StartTutorial()
    {
        ClearInstances();

        PlayerPrefs.SetInt("firstTime", 1);
        _GameType  = E_GameType.Tutorial;
        _GameState = E_GameState.Tutorial;

        CurrentLevel = "tutorial";

        Application.LoadLevel(CurrentLevel);
    }
示例#8
0
文件: Game.cs 项目: cuongdv/wushi2
    public void ResumeSinglePlayer()
    {
        if (Game.Instance.DisabledState > 1)
        {
            StartNewGame(E_GameDifficulty.Hard);
            return;
        }

        ClearInstances();
        _GameType = E_GameType.SinglePlayer;
        Save_Load();
        LoadStatistics();
        Application.LoadLevel(CurrentLevel);
    }
示例#9
0
文件: Game.cs 项目: cuongdv/wushi2
    public void ResumeSurvivalMode()
    {
        if (Game.Instance.DisabledState > 1)
        {
            StartSurvivalMode();
            return;
        }
        ClearInstances();
        _GameType = E_GameType.Survival;

        Save_Load();
        LoadStatistics();

        GameDifficulty = E_GameDifficulty.Hard;
        _CurrentLevel  = "dojo";

        Application.LoadLevel(CurrentLevel);
    }
示例#10
0
文件: Game.cs 项目: cuongdv/wushi2
    public void StartSurvivalMode()
    {
        ClearInstances();
        _GameType = E_GameType.Survival;

        ClearStatistics();
        Save_Clear();
        Save_Load();

        GameDifficulty = E_GameDifficulty.Hard;

        ComboLevel  = new E_ComboLevel[] { GetUnlockedCombo(0), GetUnlockedCombo(1), GetUnlockedCombo(2), GetUnlockedCombo(3), GetUnlockedCombo(4), GetUnlockedCombo(5) };
        SwordLevel  = GetUnlockedSword();
        HealthLevel = GetUnlockedHealth();

        _CurrentLevel = "dojo";

        Application.LoadLevel(CurrentLevel);
    }
示例#11
0
文件: Game.cs 项目: cuongdv/wushi2
    public void StartChapterMode(int index)
    {
        string[] chapters = { "level01", "level01b", "level02", "level03", "level05", "level06", "level07" };
        ClearInstances();

        _GameType = E_GameType.ChapterOnly;

        Save_Clear();
        Save_Load();
        ClearStatistics();

        GameDifficulty = E_GameDifficulty.Hard;
        CurrentLevel   = chapters[index];

        ComboLevel  = new E_ComboLevel[] { GetUnlockedCombo(0), GetUnlockedCombo(1), GetUnlockedCombo(2), GetUnlockedCombo(3), GetUnlockedCombo(4), GetUnlockedCombo(5) };
        SwordLevel  = GetUnlockedSword();
        HealthLevel = GetUnlockedHealth();

        Application.LoadLevel(CurrentLevel);
    }
示例#12
0
    public void StartTutorial()
    {
        _GameType = E_GameType.Tutorial;
        _GameState = E_GameState.Tutorial;

        CurrentLevel = "tutorial";

        StartCoroutine(LoadScene(CurrentLevel, false));
    }
示例#13
0
    public void StartNewMultiplayerGame(IPEndPoint EndPoint,
										int joinRequestId,
										Client.ConnectToServerFailedDelegate onConnectToServerFailed = null)
    {
        _GameType = E_GameType.Multiplayer;

        Instantiate(Client);

        Client.Instance.ConnectToServer(EndPoint, joinRequestId, onConnectToServerFailed);
    }
示例#14
0
    public void StartNewMultiplayerGame(uLink.HostData hostData,
										int joinRequestId,
										Client.ConnectToServerFailedDelegate onConnectToServerFailed = null)
    {
        _GameType = E_GameType.Multiplayer;

        Instantiate(Client);

        Client.Instance.ConnectToServer(hostData, joinRequestId, onConnectToServerFailed);
    }
示例#15
0
文件: Game.cs 项目: cuongdv/wushi2
    /*
     * public void SaveControls()
     * {
     *  PlayerPrefs.SetFloat(PlayerControls.E_ButtonsName.AttackX + "_X", );
     *  PlayerPrefs.SetFloat(PlayerControls.E_ButtonsName.AttackX + "_Y", );
     * }*/


    public bool IsResumePossible(E_GameType gameType)
    {
        return(PlayerPrefs.GetInt(gameType + "SaveExist", 0) == 1);
    }