Esempio n. 1
0
        public void ChangeControllableCharacter(int id)
        {
            var player = this.GetModelById(id);

            player.IsBeingControllable = false;
            var nextPlayer = new Models.PlayerViewModel();
            var index      = ListModel.IndexOf(player) + 1;

            if (ListModel.Count > index)
            {
                nextPlayer = ListModel[index];
            }
            else
            {
                nextPlayer = ListModel.First();
            }
            nextPlayer.IsBeingControllable = true;
        }