コード例 #1
0
ファイル: Phases.cs プロジェクト: Conzar/FlyCasual
    // TEMPORARY SUBPHASES

    public static void StartTemporarySubPhase(string name, System.Type subPhaseType, Action callBack = null)
    {
        CurrentSubPhase.Pause();
        if (DebugManager.DebugPhases)
        {
            Debug.Log("Temporary phase " + subPhaseType + " is started directly");
        }
        GenericSubPhase previousSubPhase = CurrentSubPhase;

        CurrentSubPhase                    = (GenericSubPhase)System.Activator.CreateInstance(subPhaseType);
        CurrentSubPhase.Name               = name;
        CurrentSubPhase.CallBack           = callBack;
        CurrentSubPhase.PreviousSubPhase   = previousSubPhase;
        CurrentSubPhase.RequiredPlayer     = previousSubPhase.RequiredPlayer;
        CurrentSubPhase.RequiredPilotSkill = previousSubPhase.RequiredPilotSkill;
        CurrentSubPhase.Start();
    }
コード例 #2
0
    // TEMPORARY SUBPHASES

    public static void StartTemporarySubPhaseOld(string name, System.Type subPhaseType, Action callBack = null)
    {
        GenericSubPhase subphase = StartTemporarySubPhaseNew(name, subPhaseType, callBack);

        CurrentSubPhase.Start();
    }