public void ShowRightDialogBox(CharactersToShow character) { rightDialogBox.gameObject.SetActive(true); string nameString = null; switch (character) { case DialogCanvasManager.CharactersToShow.MOM: nameString = "Mom"; break; case DialogCanvasManager.CharactersToShow.DAD: nameString = "Dad"; break; case DialogCanvasManager.CharactersToShow.SISTER: nameString = "Sister"; break; case DialogCanvasManager.CharactersToShow.BROTHER: nameString = "Brother"; break; } rightDialogName.text = nameString; }
public void ShowCharacterRight(CharactersToShow character) { Image spriteToShow = null; switch (character) { case DialogCanvasManager.CharactersToShow.MOM: spriteToShow = momSprite; break; case DialogCanvasManager.CharactersToShow.DAD: spriteToShow = dadSprite; break; case DialogCanvasManager.CharactersToShow.SISTER: spriteToShow = sisSprite; break; case DialogCanvasManager.CharactersToShow.BROTHER: spriteToShow = broSprite; break; } if (spriteToShow != null) { spriteToShow.enabled = true; spriteToShow.rectTransform.localScale = new Vector3(-1, 1, 1); rightSprite = spriteToShow; rightSprite.gameObject.GetComponent <SpriteMovement>().MoveInRight(); } }