/** * <summary>Gets a Sprite based on the portrait graphic of the speaking character. * If lipsincing is enabled, the sprite will be based on the current phoneme.</summary> * <returns>The speaking character's portrait sprite</returns> */ public UnityEngine.Sprite GetPortraitSprite() { if (speaker != null) { CursorIconBase portraitIcon = speaker.GetPortrait(); if (portraitIcon != null && portraitIcon.texture != null) { if (IsAnimating()) { if (speaker.isLipSyncing) { return(portraitIcon.GetAnimatedSprite(speaker.GetLipSyncFrame())); } else { portraitIcon.GetAnimatedRect(); return(portraitIcon.GetAnimatedSprite(true)); } } else { return(portraitIcon.GetSprite()); } } } return(null); }
public Sprite GetPortraitSprite() { if (speaker && speaker.portraitIcon.texture) { if (IsAnimating()) { if (speaker.isLipSyncing) { return(speaker.portraitIcon.GetAnimatedSprite(speaker.GetLipSyncFrame())); } else { return(speaker.portraitIcon.GetAnimatedSprite(true)); } } else { return(speaker.portraitIcon.GetSprite()); } } return(null); }