public void VerifyConcat() { var x1 = Char2.FromChars('a', 'b'); Char2 x2 = "ab"; Claim.eq(x2.ToString(), "ab"); Claim.eq(x1, x2); Char2 x3 = "cd"; var x4 = Char4.FromChars(x2, x3); Claim.eq(x4.ToString(), "abcd"); var x5 = x2 + x3; Claim.eq(x5, x4); var x6 = x5 + "efgh"; var x7 = Char8.FromChars(Char4.FromChars(Char2.FromChars('a', 'b'), Char2.FromChars('c', 'd')), Char4.FromChars(Char2.FromChars('e', 'f'), Char2.FromChars('g', 'h'))); Claim.eq(x6, x7); var s1 = string.Empty; for (var i = 0; i < 8; i++) { s1 += x7[i]; } Claim.eq(s1, "abcdefgh"); }
void Awake() { Char1.SetActive(false); Char2.SetActive(false); Char3.SetActive(false); Characteruse = PlayerPrefs.GetInt(SelectedCharacter); switch (Characteruse) { case 1: Char1.SetActive(true); break; case 2: Char2.SetActive(true); break; case 3: Char3.SetActive(true); break; default: Char2.SetActive(true); break; } }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } }
void Start() { CharacterPos = Char2.transform.localPosition; HidePos = Char1.transform.localPosition; Char1Renderer = Char1.GetComponent <SpriteRenderer>(); Char2Renderer = Char2.GetComponent <SpriteRenderer>(); Char3Renderer = Char3.GetComponent <SpriteRenderer>(); }
public bool Died(GameObject who) { //GameObject Send = Char2; if (Comment) { print(Char1); } if (Comment) { print(Char2); } if (Char1 != null && Char1.activeSelf) { if (Char1.GetInstanceID() == who.GetInstanceID()) { Char1_List.Clear(); } else if (Char1.GetComponent <AI> ().enabled&& Char1.GetComponent <AI> ().target_GO.GetInstanceID() == who.GetInstanceID()) { Char1.GetComponent <AI> ().target_GO = null; } } if (Char2 != null && Char2.activeSelf) { if (Char2.GetInstanceID() == who.GetInstanceID()) { Char2_List.Clear(); } else if (Char2.GetComponent <AI> ().enabled&& !Char2.GetComponent <AI> ().target_GO&& Char2.GetComponent <AI> ().target_GO != null && Char2.GetComponent <AI> ().target_GO.GetInstanceID() == who.GetInstanceID()) { Char2.GetComponent <AI> ().target_GO = null; } } Graveyard_List.Add(who); Char1_List.Remove(who); Char2_List.Remove(who); if (!who.GetComponent <CharController>().itsItem) { who.GetComponent <AI>().target_GO = null; } who.SetActive(false); return(Graveyard_List[Graveyard_List.Count - 1] == who); }
private Character SetSpeaker2(string Name, Sprite face) { Char2.SetStandardText(Name); // Char2.SetPortrait (SP); return(Char2); }