Ejemplo n.º 1
0
 public QueryChunk(string startQuery)
 {
     parameters = new Dictionary<string, object>();
     queries = new StringBuilder(startQuery);
     endingType = EndingType.Continuous;
     queryCount = 0;
 }
Ejemplo n.º 2
0
 public EndingSaveState()
 {
     isChapter2Activated = false;
     isChapter2Completed = false;
     endings             = new int[(int)EndingType.EndingCount];
     deathReason         = EndingType.Ending1;
 }
Ejemplo n.º 3
0
 public QueryChunk()
 {
     this.parameters = new Dictionary <string, object>();
     this.queries    = new StringBuilder();
     this.queryCount = 0;
     this.endingType = EndingType.Sequential;
 }
Ejemplo n.º 4
0
 public void GameOver(EndingType endingType)
 {
     switch (endingType) {
     case EndingType.Ending1:
         Debug.Log ("Game over: Death by Suffocation");
         break;
     case EndingType.Ending2:
         Debug.Log ("Game over: Death by Dog Allergy");
         break;
     case EndingType.Ending3:
         Debug.Log ("Game over: Death by Head Injury");
         break;
     case EndingType.Ending4:
         Debug.Log ("Game over: Death by Fallen Ceiling");
         break;
     case EndingType.Ending5:
         Debug.Log ("Game over: Death by Train Accident");
         break;
     }
     if (EndingController.instance.isChapter2Activated) {	// this part need to change
         Destroy(GameController.instance);
         Destroy(PlayerController.instance);
         EndingController.instance.ResetEndingController(false);
         LevelHandler.Instance.LoadSpecific ("TitleScene");
     }
     else
         LevelHandler.Instance.LoadSpecific ("EndingScene");
     //Application.LoadLevel ("EndingScene");
 }
Ejemplo n.º 5
0
    private void TriggerEnding(EndingType ending)
    {
        switch (ending)
        {
        case EndingType.FancybookLowPopularity:
        {
            ShowOverlayWithMessage("Fancybooks popularity is so low that nobody uses their platform anymore. They have closed up shop and 10,000 employees are out of work. Congrats, You win!");
        }
        break;

        case EndingType.RoddentLowPopularity:
        {
            ShowOverlayWithMessage("Roddents popularity is so low that nobody uses your platform anymore. They have closed up shop and you are out of a job. You lose.");
        }
        break;

        case EndingType.RoddentHighPopularity:
        {
            ShowOverlayWithMessage("Roddent is so popular, everyone is using them. Fancybook can't compete and have closed up shop, 10,000 employees are out of work. Congrats, You win!");
        }
        break;

        case EndingType.FancybookHighPopularity:
        {
            ShowOverlayWithMessage("Fancybook is so popular that nobody uses your platform anymore. Roddent have closed up shop and you are out of a job. You lose.");
        }
        break;
        }
    }
Ejemplo n.º 6
0
 public QueryChunk(string startQuery)
 {
     this.parameters = new Dictionary <string, object>();
     this.queries    = new StringBuilder(startQuery);
     this.endingType = EndingType.Continuous;
     this.queryCount = 0;
 }
Ejemplo n.º 7
0
        public Turn EndTurn(int ballsRemaining, EndingType ending)
        {
            int ballsMade = BallsRemaining - ballsRemaining;
            BallsRemaining -= ballsMade;
            if (BallsRemaining <= 1)
            {
                BallsRemaining = 15; // new rack
            }

            var currentPlayer = GetCurrentPlayer();
            var turn = currentPlayer.UpdateStats(this, ballsMade, ending);

            // only add the turn if it's not a continuation of the previous 'NewRack' turn
            if (Turns.Last == null || Turns.Last.Value != turn)
                Turns.AddLast(turn);

            // only switch players if this wasn't a 'NewRack' or a 3-foul
            switch (turn.Ending)
            {
                case EndingType.Miss:
                case EndingType.Foul:
                case EndingType.Safety:
                case EndingType.BreakingFoul:
                    NextPlayer();
                    break;
                case EndingType.ThreeConsecutiveFouls:
                    BallsRemaining = 15;
                    break;
            }

            return turn;
        }
Ejemplo n.º 8
0
 public QueryChunk()
 {
     parameters = new Dictionary<string, object>();
     queries = new StringBuilder();
     queryCount = 0;
     endingType = EndingType.Sequential;
 }
Ejemplo n.º 9
0
    void Init(EndingType type)
    {
        switch (type)
        {
        case EndingType.eBadDirector:
            showText = badDirector;
            break;

        case EndingType.eBadProgrammer:
            showText = badProgrammer;
            break;

        case EndingType.eBadArtist:
            showText = bad_Artist;
            break;

        case EndingType.eBadAll:
            showText = bad_All;
            break;

        case EndingType.eSuccess:
            showText = success;
            break;
        }
    }
Ejemplo n.º 10
0
 public void Load()
 {
     EndingSaveState saveState = JsonReader.readEndingSaveState ();
     this.isChapter2Activated = saveState.isChapter2Activated;
     this.isChapter2Completed = saveState.isChapter2Completed;
     this.endings = saveState.endings;
     this.deathReason = saveState.deathReason;
 }
Ejemplo n.º 11
0
    public void Load()
    {
        EndingSaveState saveState = JsonReader.readEndingSaveState();

        this.isChapter2Activated = saveState.isChapter2Activated;
        this.isChapter2Completed = saveState.isChapter2Completed;
        this.endings             = saveState.endings;
        this.deathReason         = saveState.deathReason;
    }
Ejemplo n.º 12
0
 /// <summary>
 /// Baiskonstrukto,
 /// </summary>
 public MovingAbility()
 {
     Moving = MovingType.OneWay;
     Ending = EndingType.Standing;
     Start = Vector2.Zero;
     End = Vector2.Zero;
     Center = Vector2.Zero;
     Radius = Vector2.Zero;
 }
Ejemplo n.º 13
0
    public void GameOver(EndingType endingType)
    {
        string[] ending = this.getCorePath ();

        if (EndingController.instance.isChapter2Activated) {	// this part need to change
            EndingController.instance.isChapter2Completed = true;
        }
            GameController.instance.SetLastLoadedScene(Application.loadedLevelName);
            LevelHandler.Instance.LoadSpecific ("TransitionScene");
    }
Ejemplo n.º 14
0
    // Use this for initialization
    void Start()
    {
        counter = 0.0f;
        rend = GetComponent<Renderer>();
        randomizeTimer = Random.Range(0.0f, randomizeTimer);

        eT = EndingController.instance.deathReason;
        //eT = (EndingType)1;
        Debug.Log(eT);
        updateScreen(-1);
    }
Ejemplo n.º 15
0
    // Use this for initialization
    void Start()
    {
        counter        = 0.0f;
        rend           = GetComponent <Renderer>();
        randomizeTimer = Random.Range(0.0f, randomizeTimer);

        eT = EndingController.instance.deathReason;
        //eT = (EndingType)1;
        Debug.Log(eT);
        updateScreen(-1);
    }
    // Start is called before the first frame update

    void Start()
    {
        EndingType endingType = GameStateManager.Instance.CurrentGameEndingType();

        Debug.Log(endingType);
        invBtn = GameObject.FindGameObjectWithTag("Inventory-OpenButton");
        invBtn.SetActive(false);
        dialogueBox.SetActive(true);
        StartCoroutine(Type());
        StartCoroutine(Speak());
    }
Ejemplo n.º 17
0
    public void GameOver(EndingType endingType)
    {
        string[] ending = this.getCorePath();

        if (EndingController.instance.isChapter2Activated)              // this part need to change
        {
            EndingController.instance.isChapter2Completed = true;
        }
        GameController.instance.SetLastLoadedScene(Application.loadedLevelName);
        LevelHandler.Instance.LoadSpecific("TransitionScene");
    }
Ejemplo n.º 18
0
 public void ItemTriggered(Item item)
 {
     if (item.type.Equals (Item.TRANSITION_TYPE)) {
         return;
     }
     for (int i = 0; i < endings.Length; i++) {
         if (i < item.endingPoints.Length) {
             endings[i] += item.endingPoints[i];
         }
         if (endings[i] > ENDING_LIMIT) {
             deathReason = (EndingType) i;
             GameController.instance.GameOver((EndingType) i);
             break;
         }
     }
 }
Ejemplo n.º 19
0
        private static int GetEndingSize(EndingType type)
        {
            switch (type)
            {
            case EndingType.SinglePlayer:
                return(2);

            case EndingType.Guitar:
                return(1);

            case EndingType.Scene:
                return(0);

            default:
                throw new NotSupportedException();
            }
        }
Ejemplo n.º 20
0
 public void ItemTriggered(Item item)
 {
     if (item.type.Equals(Item.TRANSITION_TYPE))
     {
         return;
     }
     for (int i = 0; i < endings.Length; i++)
     {
         if (i < item.endingPoints.Length)
         {
             endings[i] += item.endingPoints[i];
         }
         if (endings[i] > ENDING_LIMIT)
         {
             deathReason = (EndingType)i;
             this.Save();
             GameController.instance.GameOver((EndingType)i);
             break;
         }
     }
     this.Save();
 }
Ejemplo n.º 21
0
 public EndingSaveState()
 {
     isChapter2Activated = false;
     isChapter2Completed = false;
     endings = new int[(int) EndingType.EndingCount];
     deathReason = EndingType.Ending1;
 }
Ejemplo n.º 22
0
        public ActionResult EndTurn(int id, int ballsRemaining, EndingType ending)
        {
            var game = RavenSession.Load<StraightPoolGame>(id);

            game.EndTurn(ballsRemaining, ending);

            return RedirectToAction("Edit", new { id });
        }