예제 #1
0
    public void Move(int moves)
    {
        if (NoPlayTurns > 0)
        {
            this.AnimationActive = true;
            NoPlayTurns--;
            Menu.SetActive(true);
            bpm      = Menu.GetComponent <BuyPropertyMenu>();
            bpm.done = InJail;
            bpm.GenericMenu("You Are Still In Prison");
            if (NoPlayTurns == 0)
            {
                PropAction = Database.PROPERTY_ACTION.NONE;
            }
        }
        else
        {
            playerAnimations.setOnMove(moves);
            AnimationActive = true;
            playerInfo.Move(moves);
        }

        dice1.transform.localPosition = dice1.GetComponent <DiceScript>().initPosition;
        dice2.transform.localPosition = dice2.GetComponent <DiceScript>().initPosition;
    }
예제 #2
0
    public void FinishedMovement()
    {
        // Just To be sure
        if (database == null)
        {
            GameRunner gr = Manager.GetComponent <GameRunner>();
            this.database = gr.database;
        }

        if (PropAction == Database.PROPERTY_ACTION.INJAIL)     // If he was supposed to go to jail, no action is needed
        {
            NoPlayTurns = 3;
            done();
            return;
        }


        // Get Property
        Property prop = database.GetProperty(playerInfo.x, playerInfo.y);

        PropAction = database.GetNextAction(prop, playerInfo);

        Menu.SetActive(true);

        bpm = Menu.GetComponent <BuyPropertyMenu>();
        bpm.PropertyArriveMessage(prop, playerInfo, database);
        bpm.done = MenuAnswer;
    }