private void SetUIGraphic() { if (uiImageType == UIImageType.Image && uiImage != null) { if (graphicType == AC_GraphicType.Normal) { uiImage.sprite = graphic.GetAnimatedSprite(true); } else if (speech != null) { uiImage.sprite = speech.GetPortraitSprite(); } UpdateUIElement(uiImage); } if (uiImageType == UIImageType.RawImage && uiRawImage != null) { if (graphicType == AC_GraphicType.Normal) { if (graphic.texture != null && graphic.texture is RenderTexture) { uiRawImage.texture = graphic.texture; } else { uiRawImage.texture = graphic.GetAnimatedTexture(true); } } else if (speech != null) { uiRawImage.texture = speech.GetPortrait(); } UpdateUIElement(uiRawImage); } }
public override void PreDisplay(int _slot, int languageNumber, bool isActive) { if (graphicType == AC_GraphicType.DialoguePortrait) { UpdateSpeechLink(); if (speech != null) { speechTex = speech.GetPortrait(); speechIsAnimating = speech.IsAnimating(); } } if (uiImage != null) { if (graphicType == AC_GraphicType.Normal) { uiImage.sprite = graphic.GetAnimatedSprite(true); } else if (speech != null) { uiImage.sprite = speech.GetPortraitSprite(); } UpdateUIElement(uiImage); } }
private void SetUIGraphic() { if (uiImageType == UIImageType.Image && uiImage != null) { switch (graphicType) { case AC_GraphicType.Normal: uiImage.sprite = graphic.GetAnimatedSprite(true); break; case AC_GraphicType.DialoguePortrait: if (speech != null) { uiImage.sprite = speech.GetPortraitSprite(); } break; case AC_GraphicType.DocumentTexture: case AC_GraphicType.ObjectiveTexture: uiImage.sprite = sprite; break; default: break; } UpdateUIElement(uiImage); } if (uiImageType == UIImageType.RawImage && uiRawImage != null) { switch (graphicType) { case AC_GraphicType.Normal: if (graphic.texture != null && graphic.texture is RenderTexture) { uiRawImage.texture = graphic.texture; } else { uiRawImage.texture = graphic.GetAnimatedTexture(true); } break; case AC_GraphicType.DocumentTexture: case AC_GraphicType.ObjectiveTexture: uiRawImage.texture = localTexture; break; case AC_GraphicType.DialoguePortrait: if (speech != null) { uiRawImage.texture = speech.GetPortrait(); } break; } UpdateUIElement(uiRawImage); } }
private void SetUIGraphic() { if (uiImage != null) { if (graphicType == AC_GraphicType.Normal) { uiImage.sprite = graphic.GetAnimatedSprite(true); } else if (speech != null) { uiImage.sprite = speech.GetPortraitSprite(); } UpdateUIElement(uiImage); } }