Hi i have this errors with this script:
Chaos_CharScene_CreationSelection.cs(236,55): error CS1501: No overload for method AddCharacter' takes
6’ arguments
Chaos_CharScene_CreationSelection.cs(239,55): error CS1501: No overload for method AddCharacter' takes
6’ arguments
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UMA;
public enum UMALoginState
{
Login,
Register,
Authenticating,
CharacterSelect,
CharacterCreate
}
public enum CreationState
{
Body,
Head,
Face,
Hair
}
public class Chaos_CharScene_CreationSelection : MonoBehaviour {
public UICharacterSelect_List CharacterList;
private Chaos_Dialog Dialog;
public enum TestItemType
{
Head,
Torso,
Legs,
Hands,
Feet
}
public bool EmptyOutList = true;
public Transform createButton;
public UISelectField Race;
public UISelectField Aspect;
public List<GameObject> createUI;
public List<GameObject> selectUI;
public List<GameObject> characterSlots;
public GameObject enterUI;
//public UILabel nameUI;
public GameObject characterCamera;
public GameObject UMAObject;
public GameObject dialogWindow;
public TestItemType testItemType;
public SlotData testSlot;
public OverlayData testOverlay;
/*public UIButtonTween genderTween;
public UIButtonTween headTween;
public UIButtonTween bodyTween;
public UIButtonTween faceTween;
public UIButtonTween hairTween;
UIButtonTween openTween;*/
GameObject character;
List<CharacterEntry> characterEntries;
UMAAppearanceController npcAppearance;
private UMAData umaData;
private UMADnaHumanoid umaDna;
CreationState creationState;
UMALoginState loginState;
string dialogMessage = "";
string errorMessage = "";
// Character select fields
CharacterEntry characterSelected = null;
string characterName = "";
string race = "Human";
string gender = "Male";
string aspect;
public Vector3 cameraInLoc = new Vector3( 0.193684f, 2.4f, 4.743689f);
public Vector3 cameraOutLoc = new Vector3( 0.4418643f, 1.21f, 6.72f);
bool zoomingIn = false;
bool zoomingOut = false;
float xSpeed = 250.0f;
float x = 0;
float y = 0;
public string[] races = new string[8] { "Human", "Orc", "Troll", "Dwarf", "Elf", "Panthen", "Centaur", "Werewolf" };
public string[] aspects = new string[8] { "Barbarian", "Warrior", "Paladin", "Mage", "Hunter", "Rogue", "Monk", "Trader" };
// Use this for initialization
void Start ()
{
npcAppearance = UMAObject.GetComponent<UMAAppearanceController> ();
characterEntries = ClientAPI.GetCharacterEntries ();
if (characterEntries.Count > 0) {
StartCharacterSelection ();
} else {
StartCharacterCreation ();
}
if (characterCamera != null)
characterCamera.SetActive(true);
GameObject tmpObject = GameObject.Find ("Window (Dialog)");
Dialog = tmpObject.GetComponent<Chaos_Dialog> ();
Race.options.Clear();
foreach (string species in races) {
Race.options.Add(species);
}
Aspect.options.Clear();
foreach (string aspect in aspects) {
Aspect.options.Add (aspect);
}
}
// Update is called once per frame
void Update ()
{
float moveRate = 1.0f;
if (zoomingIn) {
characterCamera.transform.position = Vector3.Lerp (characterCamera.transform.position, cameraInLoc, Time.deltaTime * moveRate);
} else if (zoomingOut) {
characterCamera.transform.position = Vector3.Lerp (characterCamera.transform.position, cameraOutLoc, Time.deltaTime * moveRate);
}
}
void LateUpdate () {
if (character && Input.GetMouseButton(0) && (Input.mousePosition.x > Screen.width / 3)) {
x -= Input.GetAxis("Mouse X") * xSpeed * 0.02f;
Quaternion rotation = Quaternion.Euler(y, x, 0);
//position.y = height;
character.transform.rotation = rotation;
}
}
/*void OpeningGenderTween() {
if (openTween == genderTween) {
openTween = null;
} else if (openTween != null) {
openTween.Play(true);
openTween = genderTween;
} else {
openTween = genderTween;
}
}
void OpeningHeadTween() {
if (openTween == headTween) {
openTween = null;
} else if (openTween != null) {
openTween.Play(true);
openTween = headTween;
} else {
openTween = headTween;
}
}
void OpeningBodyTween() {
if (openTween == bodyTween) {
openTween = null;
} else if (openTween != null) {
openTween.Play(true);
openTween = bodyTween;
} else {
openTween = bodyTween;
}
}
void OpeningFaceTween() {
if (openTween == faceTween) {
openTween = null;
} else if (openTween != null) {
openTween.Play(true);
openTween = faceTween;
} else {
openTween = faceTween;
}
}
void OpeningHairTween() {
if (openTween == hairTween) {
openTween = null;
} else if (openTween != null) {
openTween.Play(true);
openTween = hairTween;
} else {
openTween = hairTween;
}
}*/
void SetCharacter (GameObject character)
{
this.character = character;
if (character != null) {
umaData = (UMAData)character.GetComponentInChildren (typeof(UMAData));
//umaData = (UMAData)character.transform.parent.gameObject.GetComponent (typeof(UMAData));
umaDna = umaData.umaRecipe.umaDna [typeof(UMADnaHumanoid)] as UMADnaHumanoid;
} else {
umaData = null;
umaDna = null;
}
}
#region Character Selection
public void StartCharacterSelection ()
{
if (enterUI != null)
enterUI.SetActive(true);
if (characterEntries.Count > 0) {
CharacterSelected (characterEntries [0]);
}
if (CharacterList != null)
{
// Empty out the list
if (EmptyOutList)
{
foreach (Transform trans in CharacterList.transform)
{
// Ignore the create button
if (trans.Equals(createButton) == false)
Destroy(trans.gameObject);
}
}
foreach (CharacterEntry charEntry in characterEntries) {
if (characterSelected == charEntry) {
CharacterList.AddCharacter((string)charEntry["characterName"], (string)charEntry["gender"], (string)charEntry["race"], (string)charEntry["aspect"], (int)charEntry["level"], true);
}
else {
CharacterList.AddCharacter((string)charEntry["characterName"], (string)charEntry["gender"], (string)charEntry["race"], (string)charEntry["aspect"], (int)charEntry["level"],false);
}
}
// Make the create button last child
if (createButton != null)
createButton.SetAsLastSibling();
}
loginState = UMALoginState.CharacterSelect;
}
public void StartCharacterSelection(List<CharacterEntry> characterEntries)
{
this.characterEntries = characterEntries;
StartCharacterSelection ();
}
public void CharacterSelected (CharacterEntry entry)
{
characterSelected = entry;
if (character != null)
Destroy (character);
race = (string)characterSelected ["race"];
gender = (string)characterSelected ["gender"];
UMADnaHumanoid umaDna = new UMADnaHumanoid ();
umaDna.SetToMiddle ();
string skinColour = (string)characterSelected ["custom:umaData:skinColour"];
string[] parts = skinColour.Split (',');
umaDna.skinColor = new Color (float.Parse (parts [0]), float.Parse (parts [1]), float.Parse (parts [2]), float.Parse (parts [3]));
string hairColor = (string)characterSelected ["custom:umaData:hairColour"];
parts = hairColor.Split (',');
umaDna.hairColor = new Color (float.Parse (parts [0]), float.Parse (parts [1]), float.Parse (parts [2]), float.Parse (parts [3]));
umaDna.hairStyle = (int)characterSelected ["custom:umaData:hairStyle"];
umaDna.facialHairStyle = (int)characterSelected ["custom:umaData:facialHairStyle"];
umaDna.hairSize = (float)characterSelected ["custom:umaData:hairSize"];
umaDna.height = (float)characterSelected ["custom:umaData:height"];
umaDna.upperMuscle = (float)characterSelected ["custom:umaData:upperMuscle"];
umaDna.upperWeight = (float)characterSelected ["custom:umaData:upperWeight"];
umaDna.lowerMuscle = (float)characterSelected ["custom:umaData:lowerMuscle"];
umaDna.lowerWeight = (float)characterSelected ["custom:umaData:lowerWeight"];
umaDna.breastSize = (float)characterSelected ["custom:umaData:breastSize"];
umaDna.foreheadSize = (float)characterSelected ["custom:umaData:foreheadSize"];
umaDna.foreheadPosition = (float)characterSelected ["custom:umaData:foreheadPosition"];
umaDna.noseSize = (float)characterSelected ["custom:umaData:noseSize"];
umaDna.nosePosition = (float)characterSelected ["custom:umaData:nosePosition"];
umaDna.noseCurve = (float)characterSelected ["custom:umaData:noseCurve"];
umaDna.noseWidth = (float)characterSelected ["custom:umaData:noseWidth"];
umaDna.noseFlatten = (float)characterSelected ["custom:umaData:noseFlatten"];
umaDna.earsSize = (float)characterSelected ["custom:umaData:earSize"];
umaDna.earsPosition = (float)characterSelected ["custom:umaData:earPosition"];
umaDna.cheekSize = (float)characterSelected ["custom:umaData:cheekSize"];
umaDna.cheekPosition = (float)characterSelected ["custom:umaData:cheekPosition"];
umaDna.lowCheekPosition = (float)characterSelected ["custom:umaData:lowerCheckPosition"];
umaDna.lipsSize = (float)characterSelected ["custom:umaData:lipsSize"];
umaDna.mouthSize = (float)characterSelected ["custom:umaData:mouthSize"];
umaDna.jawsPosition = (float)characterSelected ["custom:umaData:jawPosition"];
umaDna.chinSize = (float)characterSelected ["custom:umaData:chinSize"];
umaDna.chinPosition = (float)characterSelected ["custom:umaData:chinPosition"];
SetCharacter (npcAppearance.SetRace (character, race + gender, umaDna));
// Set equipment
character.AddComponent<UMAPropertyHandler>();
character.GetComponent<UMAPropertyHandler> ().CopyDataTo (race, gender);
if (characterSelected.ContainsKey("weaponDisplayID")) {
character.GetComponent<AtavismMobAppearance>().SetWeaponDisplay((string)characterSelected["weaponDisplayID"]);
}
if (characterSelected.ContainsKey("weapon2DisplayID")) {
character.GetComponent<AtavismMobAppearance>().SetWeapon2Display((string)characterSelected["weapon2DisplayID"]);
}
// UMA-equipment properties
if (characterSelected.ContainsKey("legDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateLegDisplay((string)characterSelected["legDisplayID"]);
}
if (characterSelected.ContainsKey("chestDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateChestDisplay((string)characterSelected["chestDisplayID"]);
}
if (characterSelected.ContainsKey("headDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateHeadDisplay((string)characterSelected["headDisplayID"]);
}
if (characterSelected.ContainsKey("feetDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateFeetDisplay((string)characterSelected["feetDisplayID"]);
}
if (characterSelected.ContainsKey("handDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateHandDisplay((string)characterSelected["handDisplayID"]);
}
if (characterSelected.ContainsKey("capeDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateBackDisplay((string)characterSelected["capeDisplayID"]);
}
if (characterSelected.ContainsKey("shoulderDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateShoulderDisplay((string)characterSelected["shoulderDisplayID"]);
}
if (characterSelected.ContainsKey("beltDisplayID")) {
character.GetComponent<UMAPropertyHandler>().UpdateBeltDisplay((string)characterSelected["beltDisplayID"]);
}
// Name
//if (nameUI != null)
// nameUI.text = (string)entry["characterName"];
}
public void Play() {
Dialog.Show("Entering the World...", false);
AtavismClient.Instance.EnterGameWorld(characterSelected.CharacterId);
}
public void DeleteCharacter() {
Dictionary<string, object> attrs = new Dictionary<string, object>();
attrs.Add("characterId", characterSelected.CharacterId);
NetworkAPI.DeleteCharacter(attrs);
foreach (CharacterEntry charEntry in characterEntries) {
if (charEntry != characterSelected) {
CharacterSelected(charEntry);
characterSelected = charEntry;
break;
}
}
StartCharacterSelection ();
}
#endregion Character Selection
#region Character Creation
public void StartCharacterCreation ()
{
ShowCreationUI ();
if (enterUI != null)
enterUI.SetActive(false);
if (character != null)
Destroy (character);
characterName = "";
int randomResult = Random.Range (0, 2);
if (randomResult == 0) {
gender = "Male";
} else {
gender = "Female";
}
if (aspects.Length > 0)
aspect = aspects [0];
SetCharacter (npcAppearance.GenerateRandomUMA (race + gender));
loginState = UMALoginState.CharacterCreate;
creationState = CreationState.Body;
// Set sliders
//heightSlider.sliderValue = 0.5f;
AddTestSlot();
}
void AddTestSlot() {
if (testOverlay != null) {
if (testItemType == TestItemType.Legs) {
if (testSlot) {
umaDna.pantsSlot = testSlot;
} else {
umaDna.pantsSlot = null;
}
umaDna.pantsOverlay = testOverlay;
npcAppearance.UpdateDisplay(umaData);
} else if (testItemType == TestItemType.Torso) {
if (testSlot) {
umaDna.torsoSlot = testSlot;
} else {
umaDna.torsoSlot = null;
}
umaDna.torsoOverlay = testOverlay;
npcAppearance.UpdateDisplay(umaData);
} else if (testItemType == TestItemType.Hands) {
if (testSlot) {
umaDna.handsSlot = testSlot;
} else {
umaDna.handsSlot = null;
}
umaDna.handsOverlay = testOverlay;
npcAppearance.UpdateDisplay(umaData);
} else if (testItemType == TestItemType.Feet) {
if (testSlot) {
umaDna.feetSlot = testSlot;
} else {
umaDna.feetSlot = null;
}
umaDna.feetOverlay = testOverlay;
npcAppearance.UpdateDisplay(umaData);
} else if (testItemType == TestItemType.Head) {
if (testSlot) {
umaDna.headSlot = testSlot;
} else {
umaDna.headSlot = null;
}
umaDna.headOverlay = testOverlay;
npcAppearance.UpdateDisplay(umaData);
}
}
}
void ZoomCameraIn() {
zoomingIn = true;
zoomingOut = false;
}
void ZoomCameraOut() {
zoomingOut = true;
zoomingIn = false;
}
public void ToggleAnim() {
Animator anim = character.GetComponentInChildren<Animator>();
if (anim.speed == 0)
anim.speed = 1;
else
anim.speed = 0;
}
public void SetCharacterName (string characterName)
{
this.characterName = characterName;
}
public void CreateCharacterWithName(string characterName)
{
this.characterName = characterName;
CreateCharacter ();
}
public void SetCharacterClass(string aspect) {
this.aspect = aspect;
}
public void SetCharacterRace(string race) {
this.race = race;
SetRace(race, gender);
}
void CreateCharacter ()
{
if (characterName == "")
return;
Dictionary<string, object> properties = new Dictionary<string, object> ();
properties.Add ("characterName", characterName);
properties.Add ("prefab", "uma_receiver");
properties.Add ("race", race);
properties.Add ("aspect", aspect);
properties.Add ("gender", gender);
properties.Add ("custom:umaData:race", race);
properties.Add ("custom:umaData:gender", gender);
properties.Add ("custom:umaData:skinColour", umaDna.skinColor.r + "," + umaDna.skinColor.g + "," + umaDna.skinColor.b + "," + umaDna.skinColor.a);
properties.Add ("custom:umaData:hairColour", umaDna.hairColor.r + "," + umaDna.hairColor.g + "," + umaDna.hairColor.b + "," + umaDna.hairColor.a);
properties.Add ("custom:umaData:hairStyle", umaDna.hairStyle);
properties.Add ("custom:umaData:facialHairStyle", umaDna.facialHairStyle);
properties.Add ("custom:umaData:hairSize", umaDna.hairSize);
properties.Add ("custom:umaData:height", umaDna.height);
properties.Add ("custom:umaData:upperMuscle", umaDna.upperMuscle);
properties.Add ("custom:umaData:upperWeight", umaDna.upperWeight);
properties.Add ("custom:umaData:lowerMuscle", umaDna.lowerMuscle);
properties.Add ("custom:umaData:lowerWeight", umaDna.lowerWeight);
properties.Add ("custom:umaData:breastSize", umaDna.breastSize);
properties.Add ("custom:umaData:foreheadSize", umaDna.foreheadSize);
properties.Add ("custom:umaData:foreheadPosition", umaDna.foreheadPosition);
properties.Add ("custom:umaData:noseSize", umaDna.noseSize);
properties.Add ("custom:umaData:nosePosition", umaDna.nosePosition);
properties.Add ("custom:umaData:noseCurve", umaDna.noseCurve);
properties.Add ("custom:umaData:noseWidth", umaDna.noseWidth);
properties.Add ("custom:umaData:noseFlatten", umaDna.noseFlatten);
properties.Add ("custom:umaData:earSize", umaDna.earsSize);
properties.Add ("custom:umaData:earPosition", umaDna.earsPosition);
properties.Add ("custom:umaData:cheekSize", umaDna.cheekSize);
properties.Add ("custom:umaData:cheekPosition", umaDna.cheekPosition);
properties.Add ("custom:umaData:lowerCheckPosition", umaDna.lowCheekPosition);
properties.Add ("custom:umaData:lipsSize", umaDna.lipsSize);
properties.Add ("custom:umaData:mouthSize", umaDna.mouthSize);
properties.Add ("custom:umaData:jawPosition", umaDna.jawsPosition);
properties.Add ("custom:umaData:chinSize", umaDna.chinSize);
properties.Add ("custom:umaData:chinPosition", umaDna.chinPosition);
Dialog.Show("Please wait...", false);
characterSelected = AtavismClient.Instance.NetworkHelper.CreateCharacter (properties);
if (characterSelected == null) {
errorMessage = "Unknown Error";
} else {
if (!characterSelected.Status) {
if (characterSelected.ContainsKey ("errorMessage")) {
errorMessage = (string)characterSelected ["errorMessage"];
}
}
}
Dialog.Hide ();
if (errorMessage == "") {
StartCharacterSelection();
//nameUI.text = characterName;
// Have to rename all the properties. This seems kind of pointless.
Dictionary<string, object> newProps = new Dictionary<string, object>();
foreach (string prop in properties.Keys) {
if (prop.Contains(":")) {
string[] newPropParts = prop.Split(':');
string newProp = "uma" + newPropParts[2];
newProps.Add(newProp, properties[prop]);
}
}
foreach (string prop in newProps.Keys) {
if (!characterSelected.ContainsKey(prop))
characterSelected.Add(prop, newProps[prop]);
}
} else {
Dialog.Show (errorMessage, true);
}
}
void SetRace (string race)
{
SetCharacter (npcAppearance.SetRace (character, race, umaDna));
AddTestSlot();
}
public void SetRace(string race, string gender)
{
SetRace (race + gender);
this.gender = gender;
}
public void CancelCharacterCreation ()
{
Destroy (character);
if (characterSelected != null) {
race = (string)characterSelected ["race"];
gender = (string)characterSelected ["gender"];
SetCharacter (npcAppearance.GenerateRandomUMA (race + gender));
}
ShowSelectionUI ();
}
void ShowSelectionUI() {
loginState = UMALoginState.CharacterSelect;
foreach (GameObject ui in selectUI) {
ui.SetActive(true);
}
foreach(GameObject ui in createUI) {
ui.SetActive(false);
}
if (enterUI != null)
enterUI.SetActive(true);
}
void ShowCreationUI() {
foreach (GameObject ui in selectUI) {
ui.SetActive(false);
}
foreach(GameObject ui in createUI) {
ui.SetActive(true);
}
}
public void SetGenderMale() {
if (gender == "Male")
return;
gender = "Male";
SetRace(race + gender);
}
public void SetGenderFemale() {
if (gender == "Female")
return;
gender = "Female";
SetRace(race + gender);
}
public void GetHeightValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.height - npcAppearance.heightMin) / (npcAppearance.heightMax - npcAppearance.heightMin));
}
public void UpdatePropertyHeight (float val)
{
// Scale val to within the min/max
val = (npcAppearance.heightMax - npcAppearance.heightMin) * val + npcAppearance.heightMin;
npcAppearance.SetHeight (umaData, umaDna, val, true);
}
public void GetHairStyleValue(GameObject requester) {
requester.SendMessage("SetSliderValue", 1.0f / npcAppearance.hairStyleCount);
}
public void UpdatePropertyHairStyle (float val)
{
npcAppearance.SetHairStyle(umaData, umaDna, (int)(val * (float)npcAppearance.hairStyleCount), true);
}
public void GetFacialHairValue(GameObject requester) {
requester.SendMessage("SetSliderValue", 1.0f / npcAppearance.facialHairStyleCount);
}
public void UpdatePropertyFacialHairStyle (float val)
{
npcAppearance.SetFacialHairStyle(umaData, umaDna, (int)(val * (float)npcAppearance.facialHairStyleCount), true);
}
public void UpdateSkinColor(Color skinColor) {
npcAppearance.SetSkinColour(umaData, umaDna, skinColor);
}
public void UpdateHairColor(Color hairColor) {
npcAppearance.SetHairColour(umaData, umaDna, hairColor, gender);
}
public void GetHairSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.hairSize - npcAppearance.hairSizeMin) / (npcAppearance.hairSizeMax - npcAppearance.hairSizeMin));
}
public void UpdatePropertyHairSize (float val)
{
// Scale val to within the min/max
val = (npcAppearance.hairSizeMax - npcAppearance.hairSizeMin) * val + npcAppearance.hairSizeMin;
npcAppearance.SetHairSize (umaData, umaDna, val, true);
}
public void GetUpperMuscleValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.upperMuscle - npcAppearance.upperMuscleMin) / (npcAppearance.upperMuscleMax - npcAppearance.upperMuscleMin));
}
public void UpdatePropertyUpperMuscle (float val)
{
// Scale val to within the min/max
val = (npcAppearance.upperMuscleMax - npcAppearance.upperMuscleMin) * val + npcAppearance.upperMuscleMin;
npcAppearance.SetUpperMuscle (umaData, umaDna, val, true);
}
public void GetUpperWeightValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.upperWeight - npcAppearance.upperWeightMin) / (npcAppearance.upperWeightMax - npcAppearance.upperWeightMin));
}
public void UpdatePropertyUpperWeight (float val)
{
// Scale val to within the min/max
val = (npcAppearance.upperWeightMax - npcAppearance.upperWeightMin) * val + npcAppearance.upperWeightMin;
npcAppearance.SetUpperWeight (umaData, umaDna, val, true);
}
public void GetLowerMuscleValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.lowerMuscle - npcAppearance.lowerMuscleMin) / (npcAppearance.lowerMuscleMax - npcAppearance.lowerMuscleMin));
}
public void UpdatePropertyLowerMuscle (float val)
{
// Scale val to within the min/max
val = (npcAppearance.lowerMuscleMax - npcAppearance.lowerMuscleMin) * val + npcAppearance.lowerMuscleMin;
npcAppearance.SetLowerMuscle (umaData, umaDna, val, true);
}
public void GetLowerWeightValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.lowerWeight - npcAppearance.lowerWeightMin) / (npcAppearance.lowerWeightMax - npcAppearance.lowerWeightMin));
}
public void UpdatePropertyLowerWeight (float val)
{
// Scale val to within the min/max
val = (npcAppearance.lowerWeightMax - npcAppearance.lowerWeightMin) * val + npcAppearance.lowerWeightMin;
npcAppearance.SetLowerWeight (umaData, umaDna, val, true);
}
public void GetBreastValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.breastSize - npcAppearance.breastsMin) / (npcAppearance.breastsMax - npcAppearance.breastsMin));
}
public void UpdatePropertyBreast (float val)
{
// Scale val to within the min/max
val = (npcAppearance.breastsMax - npcAppearance.breastsMin) * val + npcAppearance.breastsMin;
npcAppearance.SetBreasts (umaData, umaDna, val, true);
}
public void GetForeheadSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.foreheadSize - npcAppearance.foreheadSizeMin) / (npcAppearance.foreheadSizeMax - npcAppearance.foreheadSizeMin));
}
public void UpdatePropertyForeheadSize (float val)
{
// Scale val to within the min/max
val = (npcAppearance.foreheadSizeMax - npcAppearance.foreheadSizeMin) * val + npcAppearance.foreheadSizeMin;
npcAppearance.SetForeheadSize (umaData, umaDna, val, true);
}
public void ChaosCreateCharacter(InputField newCharacterName) {
this.characterName = newCharacterName.text;
CreateCharacter ();
}
public void ChaosSetRace (UISelectField newRace) {
race = newRace.value;
SetRace(race + gender);
}
public void ChaosSetGender(string mGender) {
gender = mGender;
SetRace(race + gender);
}
public void ChaosSetAspect (UISelectField newAspect) {
aspect = newAspect.value;
switch (aspect) {
case "Hunter":
break;
case "Barbarian":
break;
case "Warrior":
break;
case "Paladin":
break;
case "Mage":
break;
case "Rogue":
break;
case "Monk":
break;
case "Trader":
break;
default:
break;
}
}
public void ChaosBodyMass(Slider mBodyMass) {
float val = mBodyMass.value;
switch (race) {
case "Human":
npcAppearance.upperWeightMax = 0.65f;
npcAppearance.lowerWeightMax = 0.65f;
npcAppearance.upperWeightMin = 0.35f;
npcAppearance.lowerWeightMin = 0.35f;
npcAppearance.upperMuscleMax = 0.85f;
npcAppearance.lowerMuscleMax = 0.45f;
npcAppearance.upperMuscleMin = 0.55f;
npcAppearance.lowerMuscleMin = 0.25f;
npcAppearance.breastsMax = 0.75f;
npcAppearance.breastsMax = 0.35f;
break;
case "Elf":
npcAppearance.upperWeightMax = 0.55f;
npcAppearance.lowerWeightMax = 0.45f;
npcAppearance.upperWeightMin = 0.35f;
npcAppearance.lowerWeightMin = 0.35f;
npcAppearance.upperMuscleMax = 0.65f;
npcAppearance.lowerMuscleMax = 0.55f;
npcAppearance.upperMuscleMin = 0.45f;
npcAppearance.lowerMuscleMin = 0.35f;
npcAppearance.breastsMax = 0.75f;
npcAppearance.breastsMax = 0.35f;
break;
case "Drawf":
npcAppearance.upperWeightMax = 0.65f;
npcAppearance.lowerWeightMax = 0.65f;
npcAppearance.upperWeightMin = 0.35f;
npcAppearance.lowerWeightMin = 0.35f;
npcAppearance.upperMuscleMax = 0.85f;
npcAppearance.lowerMuscleMax = 0.45f;
npcAppearance.upperMuscleMin = 0.55f;
npcAppearance.lowerMuscleMin = 0.25f;
npcAppearance.breastsMax = 0.55f;
npcAppearance.breastsMax = 0.35f;
break;
case "Orc":
npcAppearance.upperWeightMax = 0.65f;
npcAppearance.lowerWeightMax = 0.65f;
npcAppearance.upperWeightMin = 0.35f;
npcAppearance.lowerWeightMin = 0.35f;
npcAppearance.upperMuscleMax = 0.85f;
npcAppearance.lowerMuscleMax = 0.45f;
npcAppearance.upperMuscleMin = 0.55f;
npcAppearance.lowerMuscleMin = 0.25f;
npcAppearance.breastsMax = 0.65f;
npcAppearance.breastsMax = 0.35f;
break;
case "Troll":
npcAppearance.upperWeightMax = 0.55f;
npcAppearance.lowerWeightMax = 0.45f;
npcAppearance.upperWeightMin = 0.35f;
npcAppearance.lowerWeightMin = 0.35f;
npcAppearance.upperMuscleMax = 0.65f;
npcAppearance.lowerMuscleMax = 0.55f;
npcAppearance.upperMuscleMin = 0.45f;
npcAppearance.lowerMuscleMin = 0.35f;
npcAppearance.breastsMax = 0.75f;
npcAppearance.breastsMax = 0.35f;
break;
default:
npcAppearance.upperWeightMax = 0.65f;
npcAppearance.lowerWeightMax = 0.65f;
npcAppearance.upperWeightMin = 0.35f;
npcAppearance.lowerWeightMin = 0.35f;
npcAppearance.upperMuscleMax = 0.85f;
npcAppearance.lowerMuscleMax = 0.45f;
npcAppearance.upperMuscleMin = 0.55f;
npcAppearance.lowerMuscleMin = 0.25f;
npcAppearance.breastsMax = 0.75f;
npcAppearance.breastsMax = 0.35f;
break;
}
val = (npcAppearance.upperWeightMax - npcAppearance.upperWeightMin) * val + npcAppearance.upperWeightMin;
npcAppearance.SetUpperWeight (umaData, umaDna, val, true);
val = (npcAppearance.lowerWeightMax - npcAppearance.lowerWeightMin) * val + npcAppearance.lowerWeightMin;
npcAppearance.SetLowerWeight (umaData, umaDna, val, true);
val = (npcAppearance.upperMuscleMax - npcAppearance.upperMuscleMin) * val + npcAppearance.upperMuscleMin;
npcAppearance.SetUpperMuscle (umaData, umaDna, val, true);
val = (npcAppearance.lowerMuscleMax - npcAppearance.lowerMuscleMin) * val + npcAppearance.lowerMuscleMin;
npcAppearance.SetLowerMuscle (umaData, umaDna, val, true);
}
public void ChaosHeight(Slider mHeight) {
float val = mHeight.value;
switch (race) {
case "Human":
npcAppearance.heightMax = 0.75f;
npcAppearance.heightMin = 0.45f;
break;
case "Elf":
npcAppearance.heightMax = 0.75f;
npcAppearance.heightMin = 0.45f;
break;
case "Drawf":
npcAppearance.heightMax = 0.45f;
npcAppearance.heightMin = 0.25f;
break;
case "Orc":
npcAppearance.heightMax = 0.7f;
npcAppearance.heightMin = 0.42f;
break;
case "Troll":
npcAppearance.heightMax = 0.62f;
npcAppearance.heightMin = 0.46f;
break;
default:
//default value (unchanged for human, elf)
npcAppearance.heightMax = 0.7f;
npcAppearance.heightMin = 0.35f;
break;
}
val = (npcAppearance.heightMax - npcAppearance.heightMin) * val + npcAppearance.heightMin;
npcAppearance.SetHeight (umaData, umaDna, val, true);
}
public void GetForeheadPositionValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.foreheadPosition - npcAppearance.foreheadPositionMin) / (npcAppearance.foreheadPositionMax - npcAppearance.foreheadPositionMin));
}
public void UpdatePropertyForeheadPosition (float val)
{
// Scale val to within the min/max
val = (npcAppearance.foreheadPositionMax - npcAppearance.foreheadPositionMin) * val + npcAppearance.foreheadPositionMin;
npcAppearance.SetForeheadPosition (umaData, umaDna, val, true);
}
public void GetNoseSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.noseSize - npcAppearance.noseSizeMin) / (npcAppearance.noseSizeMax - npcAppearance.noseSizeMin));
}
public void UpdatePropertyNoseSize (float val)
{
// Scale val to within the min/max
val = (npcAppearance.noseSizeMax - npcAppearance.noseSizeMin) * val + npcAppearance.noseSizeMin;
npcAppearance.SetNoseSize (umaData, umaDna, val, true);
}
public void GetNosePositionValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.nosePosition - npcAppearance.nosePositionMin) / (npcAppearance.nosePositionMax - npcAppearance.nosePositionMin));
}
public void UpdatePropertyNosePosition (float val)
{
// Scale val to within the min/max
val = (npcAppearance.nosePositionMax - npcAppearance.nosePositionMin) * val + npcAppearance.nosePositionMin;
npcAppearance.SetNosePosition (umaData, umaDna, val, true);
}
public void GetNoseCurveValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.noseCurve - npcAppearance.noseCurveMin) / (npcAppearance.noseCurveMax - npcAppearance.noseCurveMin));
}
public void UpdatePropertyNoseCurve (float val)
{
// Scale val to within the min/max
val = (npcAppearance.noseCurveMax - npcAppearance.noseCurveMin) * val + npcAppearance.noseCurveMin;
npcAppearance.SetNoseCurve (umaData, umaDna, val, true);
}
public void GetNoseWidthValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.noseWidth - npcAppearance.noseWidthMin) / (npcAppearance.noseWidthMax - npcAppearance.noseWidthMin));
}
public void UpdatePropertyNoseWidth (float val)
{
// Scale val to within the min/max
val = (npcAppearance.noseWidthMax - npcAppearance.noseWidthMin) * val + npcAppearance.noseWidthMin;
npcAppearance.SetNoseWidth (umaData, umaDna, val, true);
}
public void GetNoseFlattenValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.noseFlatten - npcAppearance.noseFlattenMin) / (npcAppearance.noseFlattenMax - npcAppearance.noseFlattenMin));
}
public void UpdatePropertyNoseFlatten (float val)
{
// Scale val to within the min/max
val = (npcAppearance.noseFlattenMax - npcAppearance.noseFlattenMin) * val + npcAppearance.noseFlattenMin;
npcAppearance.SetNoseFlatten (umaData, umaDna, val, true);
}
public void GetEarSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.earsSize - npcAppearance.earSizeMin) / (npcAppearance.earSizeMax - npcAppearance.earSizeMin));
}
public void UpdatePropertyEarSize (float val) {
// Scale val to within the min/max
val = (npcAppearance.earSizeMax - npcAppearance.earSizeMin) * val + npcAppearance.earSizeMin;
npcAppearance.SetEarSize(umaData, umaDna, val, true);
}
public void GetEarPositionValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.earsPosition - npcAppearance.earPositionMin) / (npcAppearance.earPositionMax - npcAppearance.earPositionMin));
}
public void UpdatePropertyEarPosition (float val) {
// Scale val to within the min/max
val = (npcAppearance.earPositionMax - npcAppearance.earPositionMin) * val + npcAppearance.earPositionMin;
npcAppearance.SetEarPosition(umaData, umaDna, val, true);
}
public void GetCheekSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.cheekSize - npcAppearance.cheekSizeMin) / (npcAppearance.cheekSizeMax - npcAppearance.cheekSizeMin));
}
public void UpdatePropertyCheekSize (float val) {
// Scale val to within the min/max
val = (npcAppearance.cheekSizeMax - npcAppearance.cheekSizeMin) * val + npcAppearance.cheekSizeMin;
npcAppearance.SetCheekSize(umaData, umaDna, val, true);
}
public void GetCheekPositionValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.cheekPosition - npcAppearance.cheekPositionMin) / (npcAppearance.cheekPositionMax - npcAppearance.cheekPositionMin));
}
public void UpdatePropertyCheekPosition (float val) {
// Scale val to within the min/max
val = (npcAppearance.cheekPositionMax - npcAppearance.cheekPositionMin) * val + npcAppearance.cheekPositionMin;
npcAppearance.SetCheekPosition(umaData, umaDna, val, true);
}
public void GetLowerCheekPositionValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.lowCheekPosition - npcAppearance.lowcheekPositionMin) / (npcAppearance.lowcheekPositionMax - npcAppearance.lowcheekPositionMin));
}
public void UpdatePropertyLowerCheekPosition (float val) {
// Scale val to within the min/max
val = (npcAppearance.lowcheekPositionMax - npcAppearance.lowcheekPositionMin) * val + npcAppearance.lowcheekPositionMin;
npcAppearance.SetLowerCheekPosition(umaData, umaDna, val, true);
}
public void GetLipsSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.lipsSize - npcAppearance.lipsSizeMin) / (npcAppearance.lipsSizeMax - npcAppearance.lipsSizeMin));
}
public void UpdatePropertyLipsSize (float val) {
// Scale val to within the min/max
val = (npcAppearance.lipsSizeMax - npcAppearance.lipsSizeMin) * val + npcAppearance.lipsSizeMin;
npcAppearance.SetLipsSize(umaData, umaDna, val, true);
}
public void GetMouthSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.mouthSize - npcAppearance.mouthSizeMin) / (npcAppearance.mouthSizeMax - npcAppearance.mouthSizeMin));
}
public void UpdatePropertyMouthSize (float val) {
// Scale val to within the min/max
val = (npcAppearance.mouthSizeMax - npcAppearance.mouthSizeMin) * val + npcAppearance.mouthSizeMin;
npcAppearance.SetMouthSize(umaData, umaDna, val, true);
}
public void GetJawSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.jawsSize - npcAppearance.jawSizeMin) / (npcAppearance.jawSizeMax - npcAppearance.jawSizeMin));
}
public void UpdatePropertyJawSize (float val) {
// Scale val to within the min/max
val = (npcAppearance.jawSizeMax - npcAppearance.jawSizeMin) * val + npcAppearance.jawSizeMin;
npcAppearance.SetJawSize(umaData, umaDna, val, true);
}
public void GetChinSizeValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.chinSize - npcAppearance.chinSizeMin) / (npcAppearance.chinSizeMax - npcAppearance.chinSizeMin));
}
public void UpdatePropertyChinSize (float val) {
// Scale val to within the min/max
val = (npcAppearance.chinSizeMax - npcAppearance.chinSizeMin) * val + npcAppearance.chinSizeMin;
npcAppearance.SetChinSize(umaData, umaDna, val, true);
}
public void GetChinPositionValue(GameObject requester) {
requester.SendMessage("SetSliderValue", (umaDna.chinPosition - npcAppearance.chinPositionMin) / (npcAppearance.chinPositionMax - npcAppearance.chinPositionMin));
}
public void UpdatePropertyChinPosition (float val) {
// Scale val to within the min/max
val = (npcAppearance.chinPositionMax - npcAppearance.chinPositionMin) * val + npcAppearance.chinPositionMin;
npcAppearance.SetChinPosition(umaData, umaDna, val, true);
}
#endregion Character Creation
public UMAData UmaData {
get {
return umaData;
}
}
public UMADna UMADna {
get {
return umaDna;
}
}
public UMAAppearanceController AppearanceController {
get {
return npcAppearance;
}
}
public string DialogMessage {
get {
return dialogMessage;
}
set {
dialogMessage = value;
}
}
public string ErrorMessage {
get {
return errorMessage;
}
set {
errorMessage = value;
}
}
public UMALoginState State {
get {
return loginState;
}
}
}