コード例 #1
0
ファイル: Scene.cs プロジェクト: Scriptopathe/codinsa2015
        public Controlers.ControlerBase GetControlerByHeroId(int heroId)
        {
            if (!Controlers.ContainsKey(heroId))
            {
                return(null);
            }

            return(Controlers[heroId]);
        }
コード例 #2
0
ファイル: Scene.cs プロジェクト: Scriptopathe/codinsa2015
        /// <summary>
        /// Initialise la phase de picks.
        /// </summary>
        void InitializePickPhase()
        {
            PickControler = new Controlers.PickPhaseControler(this, Controlers.Select(
                                                                  new Func <KeyValuePair <int, Controlers.ControlerBase>, EntityHero>((KeyValuePair <int, Controlers.ControlerBase> kvp) =>
            {
                return(kvp.Value.Hero);
            })).ToList());

            CommandServer.Start();
        }
コード例 #3
0
ファイル: Scene.cs プロジェクト: Scriptopathe/codinsa2015
        /// <summary>
        /// Ajoute un héro à la scène.
        /// /!\ Cet appel doit survenir avant l'appel à initialize.
        /// </summary>
        /// <param name="hero"></param>
        public void AddHero(int clientId, Entities.EntityHero hero, Controlers.ControlerBase controler)
        {
            if (__initDone)
            {
                return;
            }
            // throw new Exceptions.IdiotProgrammerException("L'appel à AddHero est impossible quand la phase de jeu a été initialisée");

            // Génère un id de contrôleur.
            int controlerId = hero.ID;

            // Mappe l'id du client à l'id du contrôleur.
            m_clientIdToControlerId[clientId] = controlerId;

            // Enregistre le contrôleur.
            lock (ControlerLock)
                Controlers.Add(controlerId, controler);
        }
コード例 #4
0
 public User_Controler(Controlers control)
 {
     this.control = control;
     User user = new User();
     user.Name = "Alex";
     user.UserColor = STATICS.USER_COLOR["Alex"];
     userList.Add("Alex", user);
     user = new User();
     user.Name = "Ben";
     user.UserColor = STATICS.USER_COLOR["Ben"];
     userList.Add("Ben", user);
     user = new User();
     user.Name = "Chris";
     user.UserColor = STATICS.USER_COLOR["Chris"];
     userList.Add("Chris", user);
     user = new User();
     user.Name = "Danny";
     user.UserColor = STATICS.USER_COLOR["Danny"];
     userList.Add("Danny", user);
 }
コード例 #5
0
 internal void Start(String layoutFile)
 {
     InitializeViews();
     fileName = layoutFile;
     Controlers = new Controlers(this);
     Controlers.Initialize();
     Loaders = new Loaders(this);
     Loaders.Initialize(layoutFile);
     this.Visibility = Visibility.Visible;
     if(STATICS.SCREEN_NUM==2)
         cloudWindow.Visibility = Visibility.Visible;
 }
コード例 #6
0
 public Card_Controler(Controlers control)
 {
     this.Control = control;
 }
コード例 #7
0
 public Touch_Controler(Controlers control)
 {
     this.control = control;
 }
コード例 #8
0
 public Gesture_Controler(Controlers control)
 {
     this.control = control;
 }
コード例 #9
0
 /// <summary>
 /// Store and manage the sorting groups
 /// </summary>
 /// <param name="gestureControler">The one created in the MainWindow</param>
 public Sorting_Group_Controler(Controlers control)
 {
     this.control = control;
 }