Exemple #1
0
 private void createTextFieldFromCharacter(ListView _CharactersListView, PlayerObject _PlayerObject)
 {
     TextField var_TextField1 = new TextField(new Rectangle(0, 0, 289, 85));
     var_TextField1.IsTextEditAble = false;
     var_TextField1.Text = _PlayerObject.Name;
     _CharactersListView.addAtBottom(var_TextField1);
 }
Exemple #2
0
        public PlayerObject createPlayerObject(PlayerObject _PlayerObject)
        {
            PlayerObject playerObject = this.createPlayerObject(RaceEnum.Human, FactionEnum.Beerdrinker, CreatureEnum.Archer, GenderEnum.Male);
            playerObject.Scale = _PlayerObject.Scale;
            playerObject.Velocity = new Vector3(0, 0, 0);
            playerObject.FactionEnum = _PlayerObject.FactionEnum;
            playerObject.RaceEnum = _PlayerObject.RaceEnum;
            playerObject.Gender = _PlayerObject.Gender;
            playerObject.Name = _PlayerObject.Name;
            playerObject.Body.setColor(_PlayerObject.Body.BodyColor);

            return playerObject;
        }
Exemple #3
0
        public PlayerObject createPlayerObject(RaceEnum objectRace, FactionEnum objectFaction, CreatureEnum objectType, GenderEnum objectGender)
        {
            PlayerObject playerObject = new PlayerObject();
            playerObject.Scale = 1;
            playerObject.Velocity = new Vector3(0, 0, 0);
            playerObject.FactionEnum = objectFaction;
            playerObject.RaceEnum = objectRace;
            playerObject.Gender = objectGender;
            playerObject.Name = NameFactory.getName(objectType, objectGender);

            this.createBodySettings(playerObject, objectRace, objectGender);

            return playerObject;
        }
 public void Decode(NetIncomingMessage im)
 {
     this.PlayerObject = Utility.Serializer.DeserializeObjectFromString<PlayerObject>(im.ReadString());
     this.MessageTime = im.ReadDouble();
 }
 public RequestPlayerMessage(PlayerObject _PlayerObject)
 {
     this.PlayerObject = _PlayerObject;
     this.MessageTime = NetTime.Now;
 }
 private void createCharacter(Factory.FactoryEnums.GenderEnum _GenderEnum)
 {
     this.playerObject = Factory.CreatureFactory.creatureFactory.createPlayerObject(Factory.FactoryEnums.RaceEnum.Human, Factory.FactoryEnums.FactionEnum.Beerdrinker, Factory.FactoryEnums.CreatureEnum.Commandant, _GenderEnum);
     this.playerObject.Body.stopWalk();
     this.playerObject.Position = new Vector3(400, 220, 0);
 }
Exemple #7
0
 public Client getClient(PlayerObject _PlayerObject)
 {
     foreach (Client var_Client in serverClients)
     {
         if (var_Client.PlayerObject != null)
         {
             if (var_Client.PlayerObject.Equals(_PlayerObject))
             {
                 return var_Client;
             }
         }
     }
     return null;
 }