Example #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entries"></param>
 /// <param name="container"></param>
 public CharacterEditorWindow(ScrObjLibraryVariable entries, CharacterEntry container, SpriteListVariable poses)
 {
     characterLibrary = entries;
     charValues       = container;
     poseLibrary      = poses;
     LoadLibrary();
 }
Example #2
0
        public CharacterEntry Create(GameAccountEntry account, byte slot, string characterName, byte race, double scale, byte gender)
        {
            var entry = new CharacterEntry
            {
                AccountId    = account.Id,
                Slot         = slot,
                Name         = characterName,
                Race         = race,
                Scale        = scale,
                Gender       = gender,
                Class        = 1,
                MapContextId = DefaultMapContextId,
                RunState     = DefaultRunState,
                CoordX       = DefaultCoordX,
                CoordY       = DefaultCoordY,
                CoordZ       = DefaultCoordZ,
                Rotation     = 0
            };

            try
            {
                _charContext.CharacterEntries.Add(entry);
                _charContext.SaveChanges();
                return(Get(entry.Id));
            }
            catch (Exception e)
            {
                Logger.WriteLog(LogType.Error, "Error creating character:");
                Logger.WriteLog(LogType.Error, e);
                return(null);
            }
        }
Example #3
0
    void InstansiateCharacter()
    {
        GUI.FocusControl(null);
        if (characterLibrary.ContainsID(uuid))
        {
            Debug.Log("uuid already exists!");
            return;
        }
        CharacterEntry c = Editor.CreateInstance <CharacterEntry>();

        c.name      = uuid;
        c.uuid      = uuid;
        c.entryName = uuid;
        c.repColor  = repColor;
        string path = "Assets/LibraryData/Characters/" + uuid + ".asset";

        AssetDatabase.CreateAsset(c, path);
        characterLibrary.InsertEntry(c, 0);
        Undo.RecordObject(characterLibrary, "Added character");
        EditorUtility.SetDirty(characterLibrary);
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();

        currentEntryList = characterLibrary.GetRepresentations("", filterStr);
        uuid             = "";
        selCharacter     = 0;
        SelectCharacter();
    }
Example #4
0
        private static CharacterEntry Default()
        {
            var rv = new CharacterEntry
            {
                Stats = new CharacterStat(-1),
                Look  = new AvatarLook()
            };

            rv.Stats.nMHP = 50;
            rv.Stats.nHP  = 50;
            rv.Stats.nMMP = 50;
            rv.Stats.nMP  = 50;

            rv.Stats.nSTR = 4; // starter npc will give ap to set correct values here
            rv.Stats.nDEX = 4;
            rv.Stats.nINT = 4;
            rv.Stats.nLUK = 4;

            rv.Stats.nLevel     = 1;
            rv.Stats.nFriendMax = 20;

            rv.Stats.tLastFame = DateTime.Now.AddDays(-1);
            rv.Stats.nPOP      = 0;
            rv.Stats.nEXP      = 0;
            rv.Stats.nAP       = 0;
            rv.Stats.nSP       = 1;

            rv.Stats.nPortal         = 0;
            rv.Stats.nPlaytime       = 0;
            rv.Look.nWeaponStickerID = 0;

            return(rv);
        }
Example #5
0
        public int HandlePacket(BaseClient client, PacketIn packet)
        {
            LobbyClient    cclient = client as LobbyClient;
            byte           slotId  = packet.GetUint8();
            CharacterEntry Info    = Databases.CharacterTable.SingleOrDefault(c => c.AccountIndex == cclient.Account.Index && c.Slot == slotId);

            PacketOut Out = new PacketOut((uint)Opcodes.ANS_CHARACTER_INFO);

            if (Info.Index < 1)
            {
                Out.WriteUInt32Reverse((uint)ResponseCodes.RC_FAILED);
            }
            else
            {
                Out.WriteUInt32Reverse((uint)ResponseCodes.RC_SUCCESS);
                Out.WriteByte(Info.Slot);
                Out.WriteByte(Info.Gender);
                Out.WriteUInt32Reverse((uint)Info.Playtime);
                Out.WriteUInt32Reverse((uint)Info.Rank);
                Out.WriteByte(Info.Threat);
                Out.WriteUInt32Reverse((uint)Info.Money);
                Out.WriteParsedString(Info.Clan, 60);
                byte[] Custom = getCustom(Info);
                Out.Write(Custom, 0, Custom.Length);
            }
            cclient.Send(Out);
            return(0);
        }
Example #6
0
        public CharacterItem(CharacterEntry entry)
        {
            Entry = entry;
            UpdateClipping();

            Inventory = new InventoryModel(entry.Inventory);
        }
Example #7
0
    void SaveSelectedCharacter()
    {
        CharacterEntry ce = (CharacterEntry)characterLibrary.GetEntryByIndex(selCharacter);

        ce.CopyValues(charValues);
        Undo.RecordObject(ce, "Updated character");
        EditorUtility.SetDirty(ce);
    }
    public override void CopyValues(ScrObjLibraryEntry other)
    {
        base.CopyValues(other);
        CharacterEntry ce = (CharacterEntry)other;

        defaultColor = ce.defaultColor;
        poses        = ce.poses;
    }
Example #9
0
        private void SendCharacterInfoProdCreate(Client client, byte slot, [CanBeNull] CharacterEntry data)
        {
            var newEntityPacket = new CreatePhysicalEntityPacket(SelectionPodStartEntityId + slot, EntityClass.CharacterSelectionPod);

            var characterInfo = CreateCharacterInfoPacket(client, slot, data);

            newEntityPacket.EntityData.Add(characterInfo);

            client.CallMethod(SysEntity.ClientMethodId, newEntityPacket);
        }
Example #10
0
        public int HandlePacket(BaseClient client, PacketIn packet)
        {
            WorldClient cclient  = (WorldClient)client;
            string      charName = packet.GetParsedString();

            PacketOut      Out   = new PacketOut((uint)Opcodes.ANS_CHARACTERFINDER_INFO);
            int            count = Databases.CharacterTable.Count(c => c.Name == charName);
            CharacterEntry chr   = Databases.CharacterTable.SingleOrDefault(c => c.Name == charName);

            if (cclient.Character.Name == charName)
            {
                Out.WriteUInt32Reverse(0x01);
            }
            else
            {
                if (cclient.Account.Index == chr.AccountIndex)
                {
                    Out.WriteUInt32Reverse((uint)ResponseCodes.RC_FAILED);
                }
                else
                {
                    if (count < 1)
                    {
                        Out.WriteUInt32Reverse((uint)ResponseCodes.RC_CHARACTERFINDER_INFO_NO_CHARACTER);
                    }
                    else
                    {
                        if (chr.IsOnline == 1)
                        {
                            Out.WriteUInt32((uint)ResponseCodes.RC_SUCCESS);
                            Out.WriteUInt32Reverse((uint)chr.Index);
                            Out.WriteParsedString(charName);
                            Out.WriteByte(chr.Faction);
                            Out.WriteByte(chr.LFG);
                            Out.WriteByte(chr.GroupStatus);
                            Out.WriteByte(chr.IsGroupPublic);
                            Out.WriteByte(chr.GroupInvite);
                            uint code = (uint)(chr.DistrictType << 24);
                            code += chr.DistrictID;
                            Districts.District d;
                            Program.districtsListener.Districts.TryGetValue(code, out d);
                            Out.WriteUInt32(code);
                            Out.WriteByte(d.isFull());
                            Out.WriteFloat(1.00f);
                        }
                        else
                        {
                            Out.WriteUInt32Reverse((uint)ResponseCodes.RC_CHARACTERFINDER_INFO_NO_CHARACTER);
                        }
                    }
                }
            }
            cclient.Send(Out);
            return(0);
        }
Example #11
0
    public void SetValues(CharacterEntry value)
    {
        atb = value;

        if (_limbs == null)
        {
            _limbs = GetComponent <CharacterLimbs>();
        }

        _limbs.Attributes = value;
    }
 public PropertyEditorCharacter(CharacterEntry entry, PCKFile archive)
 {
     InitializeComponent();
     Character = new CharacterEntry()
     {
         FriendlyName = entry.FriendlyName, ID = entry.ID
     };
     OldCharacter = entry;
     _archive     = archive;
     DataContext  = this;
 }
Example #13
0
    public void SetValues(CharacterEntry characterHere)
    {
        if (_nameText == null)
        {
            _nameText = GetComponentInChildren <Text>();
        }
        // assign variable
        CharacterHere = characterHere;

        // set the shown text to his name
        _nameText.text = CharacterHere.CharacterName;
    }
Example #14
0
        public int HandlePacket(BaseClient client, PacketIn packet)
        {
            WorldClient cclient  = (WorldClient)client;
            string      charName = packet.GetParsedString();

            PacketOut      Out   = new PacketOut((uint)Opcodes.ANS_FRIENDLIST_ADD);
            int            count = Databases.CharacterTable.Count(c => c.Name == charName);
            CharacterEntry chr   = Databases.CharacterTable.SingleOrDefault(c => c.Name == charName);

            if (cclient.Character.Name == charName)
            {
                Out.WriteUInt32Reverse((uint)ResponseCodes.RC_FRIENDLIST_ADD_SELF);
            }
            else
            {
                if (cclient.Character.AccountIndex == chr.AccountIndex)
                {
                    Out.WriteUInt32Reverse((uint)ResponseCodes.RC_FRIENDLIST_ADD_SAME_ACCOUNT);
                }
                else
                {
                    if (count < 1)
                    {
                        Out.WriteUInt32Reverse((uint)ResponseCodes.RC_FRIENDLIST_ADD_INVALID_NAME);
                    }
                    else if (count >= 1)
                    {
                        Out.WriteUInt32((uint)ResponseCodes.RC_SUCCESS);
                        Out.WriteParsedString(charName);
                        Out.WriteByte(chr.Faction);
                        Out.WriteByte(chr.IsOnline);
                        Out.WriteUInt32Reverse((uint)chr.Index);
                        Out.WriteByte(chr.LFG);
                        Out.WriteByte(chr.GroupStatus);
                        Out.WriteByte(chr.IsGroupPublic);
                        Out.WriteByte(chr.GroupInvite);
                        uint code = (uint)(chr.DistrictType << 24);
                        code += chr.DistrictID;
                        Districts.District d;
                        Program.districtsListener.Districts.TryGetValue(code, out d);
                        Out.WriteUInt32(code);
                        Out.WriteByte(d.isFull());
                        FriendEntry frnd = new FriendEntry();
                        frnd.Index = Databases.FriendTable.GenerateIndex();
                        frnd.CharacterOwnerIndex  = cclient.Character.Index;
                        frnd.CharacterFriendIndex = chr.Index;
                        Databases.FriendTable.Add(frnd);
                    }
                }
            }
            cclient.Send(Out);
            return(0);
        }
Example #15
0
 public CharacterData(CharacterEntry entry)
 {
     Name         = entry.Name;
     MapContextId = entry.MapContextId;
     ExpPoints    = entry.Experience;
     ExpLevel     = entry.Level;
     Body         = entry.Body;
     Mind         = entry.Mind;
     Spirit       = entry.Spirit;
     Class        = entry.Class;
     CloneCredits = entry.CloneCredits;
     RaceId       = (Race)entry.Race;
 }
Example #16
0
        private static COutPacket CreateCharacterPacket(bool worked, CharacterEntry c)
        {
            var p = new COutPacket(SendOps.LP_CreateNewCharacterResult);

            p.Encode1((byte)(worked ? 0 : 1));

            if (worked)
            {
                c.Encode(p);
            }

            return(p);
        }
Example #17
0
 public byte[] getCustom(CharacterEntry ch)
 {
     byte[] result = null;
     if (ch.Appearance != null && ch.Appearance.Length > 1)
     {
         string[] values = ch.Appearance.Split('-');
         result = new byte[values.Length];
         for (int i = 0; i < values.Length; ++i)
         {
             result[i] = values[i].Length > 1 ? Convert.ToByte(values[i], 16) : (byte)0;
         }
     }
     return(result);
 }
        public unsafe void RefreshCharacters()
        {
            for (int i = 0; i < Memory.Characters.Length; ++i)
            {
                CharacterEntry entry   = Memory.Characters[i];
                IntPtr         pointer = Pointers.Characters[i];

                entry.SetField(_processMemory, IntPtr.Add(pointer, 0x0), ref entry._currentHP, "CurrentHP", "IsAlive", "IsFine", "IsCaution", "IsDanger", "DisplayHP", "Percentage", "StatusName", "HealthMessage", "DebugMessage");
                entry.SetField(_processMemory, IntPtr.Add(pointer, 0x4), ref entry._isPoison, "IsPoison", "StatusName", "DebugMessage");
                entry.Room.SetField(_processMemory, IntPtr.Add(pointer, 0xA), ref entry.Room._id, "Id");

                RefreshInventory(entry);
            }
        }
Example #19
0
        private Manifestation CreateCharacterManifestation(CharacterEntry character)
        {
            using var unitOfWork = _gameUnitOfWorkFactory.CreateChar();
            var characterAppearances = unitOfWork.CharacterAppearances.GetByCharacterId(character.Id);

            var newCharacter = new Manifestation()
            {
                AppearanceData = characterAppearances,
                IsRunning      = character.RunState == 1,
                Position       = new Vector3((float)character.CoordX, (float)character.CoordY, (float)character.CoordZ)
            };

            newCharacter.GenerateGUID(EntityType.Character, character.Id);

            return(newCharacter);
        }
Example #20
0
 void SelectCharacter()
 {
     GUI.FocusControl(null);
     if (selCharacter == -1)
     {
         // Nothing selected
         charValues.ResetValues();
     }
     else
     {
         // Something selected
         CharacterEntry ce = (CharacterEntry)characterLibrary.GetEntryByIndex(selCharacter);
         ce.poses = poseLibrary.values;
         charValues.CopyValues(ce);
     }
 }
    public void ConfirmCharacterSelection()
    {
        editingCharacter = SelectedChar;

        copyAppearValues = false;         // deve ser FALSE para carregar um arquivo

        MenuCriarPersonagem();
        UpdateAppearenceValues();

        _loadGroup.SetActive(false);
        _erasePopupConfirm.SetActive(false);
        _menuGroup.SetActive(false);

        _newCharacterGroup.SetActive(true);
        _characterGroup.SetActive(true);
    }
Example #22
0
 public void UpdateCharacter()
 {
     if (character.value == null)
     {
         characterSprite.enabled = false;
         poseSprite.enabled      = false;
     }
     else
     {
         characterSprite.enabled = true;
         poseSprite.enabled      = true;
         CharacterEntry ce = (CharacterEntry)character.value;
         characterSprite.sprite = ce.defaultColor;
         poseSprite.sprite      = ce.poses[poseIndex.value];
     }
 }
Example #23
0
        private Manifestation CreateCharacterManifestation(CharacterEntry character)
        {
            using var unitOfWork = _gameUnitOfWorkFactory.CreateChar();
            var characterAppearances = unitOfWork.CharacterAppearances.GetByCharacterId(character.Id);

            var newCharacter = new Manifestation
            {
                AppearanceData = characterAppearances,
                Gender         = character.Gender,
                IsRunning      = character.IsRunning(),
                Position       = character.GetPositionVector()
            };

            newCharacter.GenerateGUID(EntityType.Character, character.Id);

            return(newCharacter);
        }
Example #24
0
	//Function to load a character data
	public CharacterEntry loadCharacter(string name){

		CharacterEntry character = null;
		name = name.ToLower();

		//If the requested character is in the dictionary, store it in "character" variable
		//else...
		if(!loadedCharacters.TryGetValue(name, out character))
		{

			//Create a new character
			character = new CharacterEntry();

			//Load the data of that character
			if (name == "glitch") {
				character.faceAnimation = Resources.LoadAll<Sprite> ("Sprites/Faces/glitch-face").ToList ();
				character.pitch = 0.92f;
			}
			else if (name == "bug") {
				character.faceAnimation = Resources.LoadAll<Sprite> ("Sprites/Faces/bug-face").ToList ();
				character.pitch = 1.6f;
            }
            else if (name == "archer")
            {
                character.faceAnimation = Resources.LoadAll<Sprite>("Sprites/Faces/archer").ToList();
                character.pitch = 1.0f;
            }
            else
            {

                //If it's not in the dictionary and it doesn't exist, simply return "none"
                loadedCharacters.TryGetValue("none", out character);
                return character;

            }

			//If it does exist, store the data in the dictionary for fast future uses
			loadedCharacters.Add(name, character);
			
		}

		//return the character info
		return character;
			
	}
    // Update is called once per frame
    public void UpdateCloseup()
    {
        characterNameBox.text = characterName.value;

        if (character.value == null)
        {
            characterRenderer.enabled = false;
            poseRenderer.enabled      = false;
        }
        else
        {
            characterRenderer.enabled = true;
            poseRenderer.enabled      = true;
            CharacterEntry ce = (CharacterEntry)character.value;
            characterRenderer.sprite = ce.defaultColor;
            poseRenderer.sprite      = ce.poses[poseIndex.value];
        }
    }
        public virtual void DeleteCharacterConfirmed()
        {
            Dictionary <string, object> attrs = new Dictionary <string, object>();

            attrs.Add("characterId", characterSelected.CharacterId);
            NetworkAPI.DeleteCharacter(attrs);
            characterSelected = null;
            foreach (CharacterEntry charEntry in characterEntries)
            {
                if (charEntry != characterSelected)
                {
                    CharacterSelected(charEntry);
                    characterSelected = charEntry;
                    StartCharacterSelection();
                    return;
                }
            }
            StartCharacterCreation();
        }
Example #27
0
        private void Handle_SelectWorld(WvsLoginClient c, CInPacket p)
        {
            var nLoginType = p.Decode1();

            if (nLoginType != 2) // Invalid LoginType ( Not ClientLogin )
            {
                return;
            }

            var nWorldID   = p.Decode1();
            var nChannelId = p.Decode1();

            if (nWorldID != 0) //Invalid World ( Not Scania )
            {
                return;
            }

            var pCenter    = ServerApp.Container.Resolve <WvsCenter>();
            var nChannelNo = pCenter.WvsGames.Length;

            if (nChannelId >= nChannelNo) //Invalid Channel
            {
                return;
            }

            c.WorldID   = nWorldID;
            c.ChannelId = nChannelId;

            var aCharList = c.Account.LoadCharIdList();
            var aEntries  = new List <CharacterEntry>();

            foreach (var pItem in aCharList)
            {
                var pEntry = new CharacterEntry();
                pEntry.Load(pItem);

                aEntries.Add(pEntry);
            }

            var aFinalList = aEntries.OrderBy(pEntry => pEntry.Stats.dwCharacterID).ToArray();

            c.SendPacket(CPacket.CLogin.SelectWorldResult(aFinalList, c.Account.AccountData.CharacterSlots));
        }
Example #28
0
        /// <summary>
        /// </summary>
        /// <param name="accountName">
        /// </param>
        /// <returns>
        /// </returns>
        public static List <CharacterEntry> LoadCharacters(string accountName)
        {
            var characters = new List <CharacterEntry>();

            foreach (DBCharacter ch in CharacterDao.GetAllForUser(accountName))
            {
                var charentry = new CharacterEntry();
                charentry.Id         = ch.Id;
                charentry.Name       = ch.Name;
                charentry.Playfield  = ch.Playfield;
                charentry.Level      = StatDao.GetById(50000, ch.Id, 54).statvalue; // 54 = Level
                charentry.Breed      = StatDao.GetById(50000, ch.Id, 4).statvalue;  // 4 = Breed
                charentry.Gender     = StatDao.GetById(50000, ch.Id, 59).statvalue; // 59 = Sex
                charentry.Profession = StatDao.GetById(50000, ch.Id, 60).statvalue; // 60 = Profession
                characters.Add(charentry);
            }

            return(characters);
        }
Example #29
0
    //Function to load a character data
    public CharacterEntry loadCharacter(string name)
    {
        CharacterEntry character = null;

        name = name.ToLower();

        //If the requested character is in the dictionary, store it in "character" variable
        //else...
        if (!loadedCharacters.TryGetValue(name, out character))
        {
            //Create a new character
            character = new CharacterEntry();

            //Load the data of that character
            if (name == "glitch")
            {
                character.faceAnimation = Resources.LoadAll <Sprite> ("Sprites/Faces/glitch-face").ToList();
                character.pitch         = 0.92f;
            }
            else if (name == "bug")
            {
                character.faceAnimation = Resources.LoadAll <Sprite> ("Sprites/Faces/bug-face").ToList();
                character.pitch         = 1.6f;
            }
            else if (name == "archer")
            {
                character.faceAnimation = Resources.LoadAll <Sprite>("Sprites/Faces/archer").ToList();
                character.pitch         = 1.0f;
            }
            else
            {
                //If it's not in the dictionary and it doesn't exist, simply return "none"
                loadedCharacters.TryGetValue("none", out character);
                return(character);
            }

            //If it does exist, store the data in the dictionary for fast future uses
            loadedCharacters.Add(name, character);
        }

        //return the character info
        return(character);
    }
Example #30
0
    void DeleteCharacter()
    {
        GUI.FocusControl(null);
        CharacterEntry c    = (CharacterEntry)characterLibrary.GetEntryByIndex(selCharacter);
        string         path = "Assets/LibraryData/Characters/" + c.uuid + ".asset";

        characterLibrary.RemoveEntryByIndex(selCharacter);
        Undo.RecordObject(characterLibrary, "Deleted character");
        EditorUtility.SetDirty(characterLibrary);
        bool res = AssetDatabase.MoveAssetToTrash(path);

        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();

        if (res)
        {
            Debug.Log("Removed character: " + c.uuid);
            selCharacter = -1;
        }
    }
        public unsafe void RefreshInventory(CharacterEntry character)
        {
            for (int i = 0; i < character.Inventory.Length; ++i)
            {
                InventoryEntry entry   = character.Inventory[i];
                IntPtr         pointer = Pointers.Inventory[character.Index, i];

                entry.SetField(_processMemory, IntPtr.Add(pointer, 0x00), ref entry._type, "Type");
                entry.SetField(_processMemory, IntPtr.Add(pointer, 0x10), ref entry._quantity, "Quantity");

                if (entry.Type != ItemEnumeration.None)
                {
                    entry.IsEmpty = false;
                }
                else
                {
                    entry.Clear();
                }
            }
        }
Example #32
0
    void DrawCharacterCreateUI()
    {
        GUILayout.BeginArea(new Rect(10, 100, 200, Screen.height - 100), skin.GetStyle("Window"));
        GUILayout.Label("Gender:");
        /*GUILayout.BeginHorizontal();
        if (GUILayout.Button("Male")) {
            gender = "Male";
            //SetRace("HumanMale");
            selectedPrefab = 0;
        } else if (GUILayout.Button("Female")) {
            gender = "Female";
            //SetRace("HumanFemale");
            selectedPrefab = 1;
        }
        GUILayout.EndHorizontal();*/
        for (int i = 0; i < characterPrefabs.Count; i++) {
            if (GUILayout.Button(characterPrefabs[i].name)) {
                SetCharacter(characterPrefabs[i]);
                selectedPrefab = i;
            }
        }
        GUILayout.Label("Name:");
        characterName = GUILayout.TextField(characterName);
        if (GUILayout.Button("Create")) {
            Dictionary<string, object> properties = new Dictionary<string, object>();
            // Core properties - these are needed
            properties.Add("characterName", characterName);
            properties.Add("prefab", characterPrefabs[selectedPrefab].name);
            properties.Add("race", race);
            properties.Add("aspect", aspect);
            properties.Add("gender", gender);

            // Custom properties - add whatever you want
            /*properties.Add ("custom:test", 27);
            properties.Add ("custom:umaData:floatVal", 1.5f);
            properties.Add ("custom:umaData:stringVal", "hi");
            properties.Add ("custom:umaData:intVal", 7);*/

            // End custom property adding

            dialogMessage = "Please wait...";
            CharacterEntry entry = Client.Instance.NetworkHelper.CreateCharacter(properties);
            if (entry == null) {
                errorMessage = "Unknown Error";
            } else {
                if (!entry.Status) {
                    if (entry.ContainsKey("errorMessage")) {
                        errorMessage = (string)entry["errorMessage"];
                    }
                }
            }
            dialogMessage = "";
            if (errorMessage == "") {
                loginState = LoginState.CharacterSelect;
                characterSelected = entry;
            }
        }
        if (GUILayout.Button("Cancel")) {
            CancelCharacterCreation();
            StartCharacterSelection();
        }
        GUILayout.EndArea();

        // Customisation Window
        /*GUILayout.BeginArea(new Rect(Screen.width - 210, 50, 200, 100), skin.GetStyle("Window"));
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Body")) {
            creationState = CreationState.Body;
        } else if (GUILayout.Button("Head")) {
            creationState = CreationState.Head;
        }
        GUILayout.EndHorizontal();
        GUILayout.EndArea();*/
    }
Example #33
0
 void CharacterSelected(CharacterEntry entry)
 {
     characterSelected = entry;
     string prefabName = (string)characterSelected ["model"];
     GameObject prefab = (GameObject)Resources.Load (prefabName);
     SetCharacter(prefab);
 }