Beispiel #1
0
        private void Init()
        {
            WindowSetup();
            CreateObjects();
            PlayerText text = new PlayerText();

            Fabric.Instance.RegisterObject(updatableObjects, drawableObjects, text);
            text.Initialize(updatableObjects.GetPlayer().GetGO().OutlineColor);
        }
Beispiel #2
0
        public void ChangePlayerAndReplaceBots(UpdatableObjects updatableObjects)
        {
            Player player        = null;
            Player currentPlayer = updatableObjects.GetPlayer();
            Random rand          = new Random();
            int    r             = rand.Next(0, updatableObjects.GetBots().Count);
            int    i             = 0;

            foreach (Player bot in updatableObjects.GetBots())
            {
                if (i == r)
                {
                    player = bot;
                }
                i++;
            }
            ReplaceBotAndChangeStatus(currentPlayer, player);
        }