/* Play * Play the animation. * If you play in Edit Mode, it updates using the EditorApplication */ public void Play() { #if UNITY_EDITOR if (Application.isPlaying) { if (uiAnimation == null) { Start(); } uiAnimation.Play(); } else { Start(); if (uiAnimation != null) { EditorApplication.update = EditorUpdate; } } if (playAudioOnPlay) { audioSource.Play(); } #else if (uiAnimation == null) { Start(); } uiAnimation.Play(); #endif }
public override void OnInspectorGUI() { base.OnInspectorGUI(); UIAnimation u = target as UIAnimation; if (u == null) { return; } _mode = (UIAnimation_Dll.Mode)EditorGUILayout.EnumPopup("Test Mode", _mode); if (EditorApplication.isPlaying && GUILayout.Button("Play")) { CoroutineManager.longLive.StartCoroutine(u.Play(_mode)); } if (!EditorApplication.isPlaying && GUILayout.Button("Set Animation to Legecy")) { for (int i = 0; i < u.units.Length; i++) { AnimationClip a = u.units[i].clip; if (a) { a.legacy = true; a.wrapMode = WrapMode.Clamp; } } } }
public void Spring() { springEffect1.Play(); springEffect2.Play(); springEffect3.Play(); springEffect4.Play(); }
/// <summary> /// Starts the fade screen transition animation /// </summary> private void StartFadeAnimation(TransitionInfo transitionInfo, bool show, float duration) { float fromAlpha = show ? 0f : 1f; float toAlpha = show ? 1f : 0f; UIAnimation anim = UIAnimation.Alpha(gameObject, fromAlpha, toAlpha, duration); anim.style = transitionInfo.animationStyle; anim.animationCurve = transitionInfo.animationCurve; anim.startOnFirstFrame = true; if (!show) { anim.OnAnimationFinished = (GameObject obj) => { SetVisibility(false); }; } else { anim.OnAnimationFinished = null; } anim.Play(); }
public void Wave() { waveEffect1.Play(); waveEffect2.Play(); waveEffect3.Play(); waveEffect4.Play(); }
public void Hide(bool cancelled, object[] outData) { if (!isShowing) { return; } isShowing = false; if (callback != null) { callback(cancelled, outData); } // Start the popup hide animations UIAnimation anim = null; anim = UIAnimation.Alpha(gameObject, 1f, 0f, animDuration); anim.style = UIAnimation.Style.EaseOut; anim.startOnFirstFrame = true; anim.OnAnimationFinished += (GameObject target) => { gameObject.SetActive(false); }; anim.Play(); OnHiding(); }
public static void SwapText(Text uiText, string text, float duration) { Color fromColor = uiText.color; Color toColor = uiText.color; fromColor.a = 1f; toColor.a = 0f; // Fade out the bundle text UIAnimation fadeOutAnim = UIAnimation.Color(uiText, fromColor, toColor, duration / 2f); fadeOutAnim.style = UIAnimation.Style.EaseOut; fadeOutAnim.OnAnimationFinished += (GameObject obj) => { // Now that the text has faded out change the text uiText.text = text; fromColor.a = 0f; toColor.a = 1f; // Fade it back in UIAnimation fadeInAnim = UIAnimation.Color(uiText, fromColor, toColor, duration / 2f); fadeInAnim.style = UIAnimation.Style.EaseOut; fadeInAnim.Play(); }; fadeOutAnim.Play(); }
/// <summary> /// Sets up and plays the UIAnimation for a coin /// </summary> private UIAnimation PlayAnimation(UIAnimation anim) { anim.style = UIAnimation.Style.EaseIn; anim.OnAnimationFinished += (GameObject target) => { coinPool.ReturnObjectToPool(target); }; anim.Play(); return(anim); }
/// <summary> /// 设置并播放硬币的UIAnimation /// </summary> private void PlayAnimation(UIAnimation anim, float startDelay) { anim.style = UIAnimation.Style.EaseOut; anim.startDelay = startDelay; anim.startOnFirstFrame = true; anim.OnAnimationFinished += (GameObject target) => { coinPool.ReturnObjectToPool(target); }; anim.Play(); }
private void DoFadeAnim() { // Start the popup show animations UIAnimation anim = null; anim = UIAnimation.Alpha(gameObject, 0f, 1f, animDuration); anim.startOnFirstFrame = true; anim.OnAnimationFinished = null; anim.Play(); }
private void diploEnterTop() { foreach (Graphic graphic in diploReact) { diplomacyResize = UIAnimator.Scale (DiplomacyTab.GetComponent <RectTransform>(), new Vector3(0, 0, 0), new Vector3(1, 1, 1), 0.1f); diplomacyFade = UIAnimator.ChangeColor(graphic, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f); diplomacyResize.SetDelay(0f); diplomacyResize.Play(); diplomacyFade.Play(); } }
private void DoZoomAnim() { // Start the popup show animations UIAnimation anim = null; anim = UIAnimation.Alpha(gameObject, 0f, 1f, animDuration); anim.style = UIAnimation.Style.EaseOut; anim.startOnFirstFrame = true; anim.OnAnimationFinished = null; anim.Play(); anim = UIAnimation.ScaleX(animContainer, 0f, 1f, animDuration); anim.style = UIAnimation.Style.Custom; anim.animationCurve = animCurve; anim.startOnFirstFrame = true; anim.Play(); anim = UIAnimation.ScaleY(animContainer, 0f, 1f, animDuration); anim.style = UIAnimation.Style.Custom; anim.animationCurve = animCurve; anim.startOnFirstFrame = true; anim.Play(); }
/// <summary> /// Starts the swipe screen transition animation /// </summary> private void StartSwipeAnimation(TransitionInfo transitionInfo, bool show, bool back, float duration) { float screenWidth = RectT.rect.width; float fromX = 0f; float toX = 0f; if (show && back) { fromX = -screenWidth; toX = 0; } else if (show && !back) { fromX = screenWidth; toX = 0; } else if (!show && back) { fromX = 0; toX = screenWidth; } else if (!show && !back) { fromX = 0; toX = -screenWidth; } UIAnimation anim = UIAnimation.PositionX(RectT, fromX, toX, duration); anim.style = transitionInfo.animationStyle; anim.animationCurve = transitionInfo.animationCurve; anim.startOnFirstFrame = true; if (!show) { anim.OnAnimationFinished = (GameObject obj) => { SetVisibility(false); }; } else { anim.OnAnimationFinished = null; } anim.Play(); }
public void contiueToAuction() { increaseBid.gameObject.SetActive(true); decreaseBid.gameObject.SetActive(true); App app = UnityEngine.Object.FindObjectOfType <App>(); int playerIndex = app.GetHumanIndex(); Nation player = State.getNations()[playerIndex]; Debug.Log("Coutinune to Auction @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + State.GetPhase().ToString()); tradeResultsExit.Play(); tradeResultsPanel.SetActive(false); //State.advanceGamePhase(); Debug.Log("GamePhase is: " + State.GetPhase().ToString()); // Check if should to go auction (if enough turns have gone by) int turn = State.turn; if (turn > 5 && turn % 3 == 0) { // Debug.Log("Auction Time? It is Turn: " + State.turn); AuctionHandler auction = State.getAuctionHandler(); auction.NewAuction(); prepareAuctionPanel(auction); openAuctionPanel(); nextAuctionPhase(); turnButton.interactable = true; } else { // turnButton.interactable = true; continueToEvents(); // Have these guys only get called after all events are resolved // Probably want to have at least one Decision Event come up and have the final one call continueToNextTurn when // the event queue is empty turnButton.interactable = true; continueToNextTurn(); } }
private void togleInformationPanel() { if (informationPanel.activeSelf == false || informationFlag == false) { updateInformationPanel(); informationPanel.SetActive(true); informationEnter.Play(); informationFlag = true; return; } else { if (informationFlag == true) { informationExit.Play(); informationFlag = false; // inventoryPanel.SetActive(false); } } }
private void toggleHeader() { if (mainHeader.activeSelf == false || header_Flag == false) { assignHeaderValues(); mainHeader.SetActive(true); headerEnter.Play(); header_Flag = true; return; } else { if (header_Flag == true) { headerExit.Play(); header_Flag = false; // inventoryPanel.SetActive(false); } } }
// Start is called before the first frame update void Start() { app = UnityEngine.Object.FindObjectOfType <App>(); Music musicPlayer = app.GetComponentInChildren <Music>(); musicPlayer.musicOn = true; newGameButton.onClick.AddListener(delegate { startNewGame(); }); loadGameButton.onClick.AddListener(delegate { loadSavedGame(); }); logoTransform = imperialTimesLogo.GetComponent <RectTransform>(); logoFadeIn = UIAnimator.Scale(logoTransform, new Vector3(0, 0, 0), new Vector3(2, 2, 2), 2f).SetModifier(Modifier.QuadIn); Quaternion rotation = logoTransform.localRotation; logoFadeIn.SetEffect(Effect.Spring(0.5f, 1), rotation); /* logoFadeIn = new UIGroupAnimation( * UIAnimator.FadeIn(logoTransform.GetComponent<Image>(), 2), * UIAnimator.FadeIn(logoTransform.GetComponentInChildren<Image>(), 2), * UIAnimator.FadeIn(logoTransform.GetComponentInChildren<TextMeshProUGUI>(), 2) * ); */ // logoFadeIn.SetDelay(1f); logoFadeIn.Play(); // imperialTimesLogo.SetActive(false); // logoRect = imperialTimesLogo.GetComponentInChildren<Graphic>(); //imperialTimesLogo.SetActive(true); // logoFadeIn = new UIGroupAnimation( // UIAnimator.FadeIn(logoBackground, 1.5f), // UIAnimator.FadeIn(logoOrniment, 1.5f) // diplomacyIn = UIAnimator.ChangeColor(logoBackground, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 3f), // diplomacyIn = UIAnimator.ChangeColor(logoOrniment, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 3f) // ); // diplomacyIn = UIAnimator.ChangeColor(logoBackground, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f); // diplomacyIn = UIAnimator.ChangeColor(logoOrniment, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f); // diplomacyIn = UIAnimator.ChangeColor(logoBackground, new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1.2f); // logoFadeIn.Play(); // Debug.Log("Are you doing anything?"); }
private void showInventoryPanel() { App app = UnityEngine.Object.FindObjectOfType <App>(); int playerIndex = app.GetHumanIndex(); Nation player = State.getNations()[playerIndex]; if (InventoryPanel.activeSelf == false || flag == false) { updateInventoryPanel(); InventoryPanel.SetActive(true); inventoryEnter.Play(); flag = true; return; } else { if (flag == true) { inventoryExit.Play(); flag = false; // inventoryPanel.SetActive(false); } } }
public void Linear() { linear1Animation.Play(); linear2Animation.Play(); }
void Start() { //DEMO 2 - MODIFIERS linear1Animation = UIAnimator.MoveHorizontal(modDemo1, 0.3f, 0.7f, 2f); linear2Animation = UIAnimator.MoveHorizontal(modDemo2, 0.3f, 0.7f, 2f).SetModifier(Modifier.Linear); quadInAnimation = UIAnimator.MoveHorizontal(modDemo1, 0.3f, 0.7f, 2f).SetModifier(Modifier.QuadIn); quadOutAnimation = UIAnimator.MoveHorizontal(modDemo2, 0.3f, 0.7f, 2f).SetModifier(Modifier.QuadOut); cubInAnimation = UIAnimator.MoveHorizontal(modDemo1, 0.3f, 0.7f, 2f).SetModifier(Modifier.CubIn); cubOutAnimation = UIAnimator.MoveHorizontal(modDemo2, 0.3f, 0.7f, 2f).SetModifier(Modifier.CubOut); polyInAnimation = UIAnimator.MoveHorizontal(modDemo1, 0.3f, 0.7f, 2f).SetModifier(Modifier.PolyIn); polyOutAnimation = UIAnimator.MoveHorizontal(modDemo2, 0.3f, 0.7f, 2f).SetModifier(Modifier.PolyOut); sinAnimation = UIAnimator.MoveHorizontal(modDemo1, 0.3f, 0.7f, 2f).SetModifier(Modifier.Sin); tanAnimation = UIAnimator.MoveHorizontal(modDemo2, 0.3f, 0.7f, 2f).SetModifier(Modifier.Tan); circularInAnimation = UIAnimator.MoveHorizontal(modDemo1, 0.3f, 0.7f, 2f).SetModifier(Modifier.CircularIn); circularOutAnimation = UIAnimator.MoveHorizontal(modDemo2, 0.3f, 0.7f, 2f).SetModifier(Modifier.CircularOut); //DEMO 3 - EFFECTS springEffect1 = UIAnimator.Move(effDemo1, new Vector2(0.5f, 0.7f), new Vector2(0.8f, 0.7f), 2f).SetModifier(Modifier.PolyIn).SetEffect(Effect.Spring(0.21f, 4)); springEffect2 = UIAnimator.Move(effDemo2, new Vector2(0.5f, 0.5f), new Vector2(0.8f, 0.5f), 2f).SetEffect(Effect.Spring(0.2f, 6), Quaternion.Euler(0, 0, 90f)); springEffect3 = UIAnimator.Move(effDemo3, new Vector2(0.2f, 0.6f), new Vector2(0.2f, 0.6f), 2f).SetEffect(Effect.Spring(0.1f, 4)); springEffect4 = UIAnimator.Move(effDemo4, new Vector2(0.4f, 0.6f), new Vector2(0.4f, 0.6f), 2f).SetEffect(Effect.Spring(0.1f, 4), Quaternion.Euler(0, 0, 90f)); waveEffect1 = UIAnimator.Move(effDemo1, new Vector2(0.5f, 0.7f), new Vector2(0.8f, 0.7f), 2f).SetModifier(Modifier.CircularIn).SetEffect(Effect.Wave(0.05f, 10)); waveEffect2 = UIAnimator.Move(effDemo2, new Vector2(0.5f, 0.5f), new Vector2(0.8f, 0.5f), 2f).SetModifier(Modifier.Linear).SetEffect(Effect.Wave(0.1f, 6), Quaternion.Euler(0, 0, 90f)); waveEffect3 = UIAnimator.Move(effDemo3, new Vector2(0.2f, 0.6f), new Vector2(0.2f, 0.6f), 2f).SetEffect(Effect.Wave(0.1f, 4)); waveEffect4 = UIAnimator.Move(effDemo4, new Vector2(0.4f, 0.6f), new Vector2(0.4f, 0.6f), 2f).SetEffect(Effect.Wave(0.1f, 4), Quaternion.Euler(0, 0, 90f)); explosionEffect1 = UIAnimator.Move(effDemo1, new Vector2(0.5f, 0.7f), new Vector2(0.8f, 0.7f), 2f).SetModifier(Modifier.CircularOut); explosionEffect2 = UIAnimator.Move(effDemo2, new Vector2(0.5f, 0.5f), new Vector2(0.8f, 0.5f), 2f).SetModifier(Modifier.CircularOut).SetEffect(Effect.Explosion(0.2f)); explosionEffect3 = UIAnimator.Move(effDemo3, new Vector2(0.2f, 0.6f), new Vector2(0.2f, 0.6f), 2f).SetEffect(Effect.Explosion(0.1f)); explosionEffect4 = UIAnimator.Move(effDemo4, new Vector2(0.4f, 0.6f), new Vector2(0.4f, 0.6f), 2f).SetEffect(Effect.Explosion(0.2f)); //DEMO 4 - GROUPS springGroupEffect = new UIGroupAnimation( UIAnimator.Move(groupEffDemo[0], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 1f).SetEffect(Effect.Spring(0.2f, 4), Quaternion.Euler(0, 0, 000f)), UIAnimator.Move(groupEffDemo[1], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 1f).SetEffect(Effect.Spring(0.2f, 4), Quaternion.Euler(0, 0, 090f)), UIAnimator.Move(groupEffDemo[2], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 1f).SetEffect(Effect.Spring(0.2f, 4), Quaternion.Euler(0, 0, 180f)), UIAnimator.Move(groupEffDemo[3], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 1f).SetEffect(Effect.Spring(0.2f, 4), Quaternion.Euler(0, 0, 270f)) ); waveGroupEffect = new UIGroupAnimation( UIAnimator.Move(groupEffDemo[0], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 4f).SetEffect(Effect.Wave(0.2f, 4), Quaternion.Euler(0, 0, 090f)), UIAnimator.Move(groupEffDemo[1], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 4f).SetEffect(Effect.Wave(0.2f, 4), Quaternion.Euler(0, 0, 045f)).SetDelay(0.25f), UIAnimator.Move(groupEffDemo[2], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 4f).SetEffect(Effect.Wave(0.2f, 4), Quaternion.Euler(0, 0, 000f)).SetDelay(0.50f), UIAnimator.Move(groupEffDemo[3], new Vector2(0.3f, 0.6f), new Vector2(0.3f, 0.6f), 4f).SetEffect(Effect.Wave(0.2f, 4), Quaternion.Euler(0, 0, 315f)).SetDelay(0.75f) ); explosionGroupEffect = new UIGroupAnimation(groupEffDemo, UIAnimator.Move(groupEffDemo[0], new Vector2(0.3f, 0.6f), new Vector2(0.7f, 0.6f), 2f)); //DEMO 5 = SCALE/ROTATE scale1Animation = UIAnimator.Scale(scaleDemo1, new Vector3(0.0f, 0.0f), new Vector3(2.5f, 2.5f), 2f).SetModifier(Modifier.PolyIn).SetEffect(Effect.Wave(0.2f, 7)); rotation1Animation = UIAnimator.Rotate(scaleDemo2, Quaternion.Euler(0, 0, -90), Quaternion.Euler(0, 0, 90), 2f); //DEMO 6 - COLOR callback1Animation = UIAnimator.Move(colorDemo[0].rectTransform, new Vector2(0.3f, 0.45f), new Vector2(0.3f, 0.75f), 1f); callback2Animation = UIAnimator.Move(colorDemo[1].rectTransform, new Vector2(0.3f, 0.75f), new Vector2(0.4f, 0.55f), 1f); callback3Animation = UIAnimator.Move(colorDemo[2].rectTransform, new Vector2(0.4f, 0.55f), new Vector2(0.5f, 0.75f), 1f); callback4Animation = UIAnimator.Move(colorDemo[2].rectTransform, new Vector2(0.5f, 0.75f), new Vector2(0.6f, 0.55f), 1f); callback5Animation = UIAnimator.Move(colorDemo[3].rectTransform, new Vector2(0.6f, 0.55f), new Vector2(0.7f, 0.75f), 1f); callback6Animation = UIAnimator.Move(colorDemo[4].rectTransform, new Vector2(0.7f, 0.75f), new Vector2(0.3f, 0.45f), 1f).SetEffect(Effect.Wave(0.2f, 1), Quaternion.Euler(0, 0, 90f)); callback1Animation.SetCallback(callback2Animation.Play); callback2Animation.SetCallback(callback3Animation.Play); callback3Animation.SetCallback(callback4Animation.Play); callback4Animation.SetCallback(callback5Animation.Play); callback5Animation.SetCallback(callback6Animation.Play); callback6Animation.SetCallback(ResetAnimation); callback1Animation.Play(); //DEMO 7 - LOOP //PLEASE SEE THE COMPONENTS IN INSPECTOR OR READ THE INSTRUCTIONS }
public void ResetAnimation() { callback1Animation.Play(); }
public void FromTo() { scale1Animation.Play(); rotation1Animation.Play(); }
public void WaveGroup() { waveGroupEffect.Play(); }
public void SpringGroup() { springGroupEffect.Play(); }
public void Circular() { circularInAnimation.Play(); circularOutAnimation.Play(); }
public void SinTan() { sinAnimation.Play(); tanAnimation.Play(); }
public void Poly() { polyInAnimation.Play(); polyOutAnimation.Play(); }
public void Cub() { cubInAnimation.Play(); cubOutAnimation.Play(); }
public void Quad() { quadInAnimation.Play(); quadOutAnimation.Play(); }
private void showTradeResults(Nation player) { Debug.Log("Preparing Trade Results"); Market market = State.market; TradeResults.SetActive(true); tradeResultsEnter.Play(); float imports = player.getImportValues(); float exports = player.getExportValue(); imports = (float)Math.Round(imports, 2); exports = (float)Math.Round(exports, 2); float difference = Mathf.Abs(imports - exports); difference = (float)Math.Round(difference, 2); TextMeshProUGUI _importExportDif = importExportDif.GetComponent<TextMeshProUGUI>(); if (imports > exports) { _importExportDif.SetText("Imports: " + imports + " Exports: " + exports + " Deficit: " + difference); _importExportDif.color = new Color32(255, 0, 0, 255); } else { _importExportDif.SetText("Imports: " + imports + " Exports: " + exports + " Surplus: " + difference); _importExportDif.color = new Color32(0, 204, 0, 255); } ImportsResultTable.ClearRows(); foreach(Signal imp in player.getImports()) { TableRow newRow = Instantiate<TableRow>(resSoldRow); newRow.gameObject.SetActive(true); newRow.preferredHeight = 25; ImportsResultTable.AddRow(newRow); importsConnector.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, (ImportsResultTable.transform as RectTransform).rect.height); newRow.Cells[0].GetComponentInChildren<Text>().text = "Bought"; //Image Transform res = newRow.Cells[1].transform.GetChild(0); Image resImg = res.GetComponent<Image>(); resImg.preserveAspect = true; if (imp.getRes()) { resImg.sprite = Resources.Load("Resource/" + imp.getResourceType().ToString(), typeof(Sprite)) as Sprite; } else { resImg.sprite = Resources.Load("FinishedGoods/" + imp.getGoodType().ToString(), typeof(Sprite)) as Sprite; } newRow.Cells[2].GetComponentInChildren<Text>().text = "from"; Transform flag = newRow.Cells[3].transform.GetChild(0); //Image flagImg = flag.GetComponent<Image>(); UIObject3D flagObject = flag.GetComponent<UIObject3D>(); // flagImg.preserveAspect = true; Nation owner = State.getNations()[imp.getOwnerIndex()]; GameObject flagPrefab = Instantiate(Resources.Load<GameObject>("Flags/Prefabs/" + owner.getNationName())); flagObject.ObjectPrefab = flagPrefab.transform; // flagImg.sprite = Resources.Load("Flags/" + owner.getName().ToString(), typeof(Sprite)) as Sprite; newRow.Cells[4].GetComponentInChildren<Text>().text = "for " + imp.getPriceSold().ToString("0.0"); } ExportsResultTable.ClearRows(); foreach (Signal exp in player.getExports()) { TableRow newRow = Instantiate<TableRow>(resSoldRow); newRow.gameObject.SetActive(true); newRow.preferredHeight = 25; ExportsResultTable.AddRow(newRow); exportConnector.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, (ExportsResultTable.transform as RectTransform).rect.height); newRow.Cells[0].GetComponentInChildren<Text>().text = "Sold"; Transform res = newRow.Cells[1].transform.GetChild(0); Image resImg = res.GetComponent<Image>(); resImg.preserveAspect = true; if (exp.getRes()) { resImg.sprite = Resources.Load("Resource/" + exp.getResourceType().ToString(), typeof(Sprite)) as Sprite; } else { resImg.sprite = Resources.Load("FinishedGoods/" + exp.getGoodType().ToString(), typeof(Sprite)) as Sprite; } newRow.Cells[2].GetComponentInChildren<Text>().text = "to"; Transform flag = newRow.Cells[3].transform.GetChild(0); //Image flagImg = flag.GetComponent<Image>(); //flagImg.preserveAspect = true; Nation owner = State.getNations()[exp.getOwnerIndex()]; UIObject3D flagObject = flag.GetComponent<UIObject3D>(); Debug.Log(owner.getNationName()); GameObject flagPrefab = Instantiate(Resources.Load<GameObject>("Flags/Prefabs/" + owner.getNationName())); flagObject.ObjectPrefab = flagPrefab.transform; //flagImg.sprite = Resources.Load("Flags/" + owner.getName().ToString(), typeof(Sprite)) as Sprite; newRow.Cells[4].GetComponentInChildren<Text>().text = "for " + exp.getPriceSold().ToString("0.0"); } Debug.Log("Finished Preparing Trade Results"); // State.advanceGamePhase(); }