示例#1
0
        public void Move(Vector2 dest, uint peerID)
        {
            ChampionEntity champion = GetChampionEntity(peerID);

            if (champion != null)
            {
                champion.GetComponent <BodyComponent>().Move(dest);
            }
        }
示例#2
0
        public void AddClient(Peer peer)
        {
            peers.Add(peer.ID, peer);

            Random rand    = new Random();
            var    randPos = new Vector2((float)rand.NextDouble() * 5.0f + 1.5f, (float)rand.NextDouble() * 5.0f + 1.5f);

            ChampionEntity champion = new ChampionEntity(peer.ID, count++ % 2 == 0 ? Team.Blue : Team.Red, collision.GenerateDynamicBody(randPos, 0.3f), 45f, root);

            visionManager.AddUnit(champion);

            unitManager.AddUnit(UnitType.Champion, champion);
        }