Exemplo n.º 1
0
        public static void StopPortraitTweens()
        {
            // Stop all tweening portraits
            foreach (Character c in Character.activeCharacters)
            {
                if (c.state.portraitImage != null)
                {
                    if (LeanTween.isTweening(c.state.portraitImage.gameObject))
                    {
                        LeanTween.cancel(c.state.portraitImage.gameObject, true);

                        PortraitController.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position);
                        if (c.state.dimmed == true)
                        {
                            c.state.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f);
                        }
                        else
                        {
                            c.state.portraitImage.color = Color.white;
                        }
                    }
                }
            }
        }