void Start() { left = left.GetComponent<Button> (); right = right.GetComponent<Button> (); create = create.GetComponent<Button> (); select = select.GetComponent<Button> (); editMenu = editMenu.GetComponent<Canvas> (); char1 = char1.GetComponent<CharAppearance> (); char2 = char2.GetComponent<CharAppearance> (); char3 = char3.GetComponent<CharAppearance> (); char4 = char4.GetComponent<CharAppearance> (); char5 = char5.GetComponent<CharAppearance> (); char6 = char6.GetComponent<CharAppearance> (); charIndex=1; editMenu.enabled = false; char1.getAppearance (); char2.getAppearance (); char3.getAppearance (); char4.getAppearance (); char5.getAppearance (); char6.getAppearance (); lerpValue = 0f; to = schijf.transform.eulerAngles.y; from = schijf.transform.eulerAngles.y; }
public void startEdit() { string charname = "Character " + CharMenuScript.charIndex.ToString (); charAp = GameObject.Find(charname).GetComponent<CharAppearance> (); Skin = charAp.skinColor; hair = charAp.hair; face = charAp.face; shirt = charAp.shirt; pants = charAp.pants; setSlider (); }