Keep nearby group numbers associated and strengthen light ribbon visibility
This commit is contained in:
@@ -63,7 +63,7 @@ namespace MagnetismHeroes.Editor
|
||||
var cape = badge.transform.Find("RibbonCape");
|
||||
var line = cape.GetComponent<LineRenderer>(); line.sharedMaterial = ribbonMaterial;
|
||||
line.useWorldSpace = false; line.positionCount = 10; line.widthMultiplier = .065f;
|
||||
line.startColor = new Color(.1f, .35f, .8f, .9f); line.endColor = new Color(.9f, .15f, .12f, .45f);
|
||||
line.startColor = new Color(.8f, .15f, .12f, .9f); line.endColor = new Color(.1f, .25f, .75f, .85f);
|
||||
data.ApplyModifiedPropertiesWithoutUndo();
|
||||
var number = badge.GetComponentInChildren<TextMeshPro>(); number.fontSize = 3.5f; number.rectTransform.sizeDelta = new Vector2(1, .6f);
|
||||
var numberMaterial = AssetDatabase.LoadAssetAtPath<Material>(Root + "Materials/NumberOutline.mat");
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace MagnetismHeroes.Editor
|
||||
camera.targetTexture = target; camera.aspect = (float)width / height;
|
||||
canvas.renderMode = RenderMode.ScreenSpaceCamera; canvas.worldCamera = camera; canvas.planeDistance = .5f;
|
||||
safe.enabled = false; safeRect.anchorMin = new Vector2(inset / width, 0); safeRect.anchorMax = new Vector2(1 - inset / width, 1);
|
||||
foreach (var ball in app.Presenter.Balls.Values) ball.SendMessage("Update");
|
||||
app.Presenter.SendMessage("LateUpdate"); Canvas.ForceUpdateCanvases();
|
||||
if (expression >= 0)
|
||||
foreach (var face in app.GetComponentsInChildren<SpriteRenderer>()) face.sprite = AssetDatabase.LoadAssetAtPath<Sprite>($"Assets/MagnetismHeroes/UnityRuntime/Presentation/Sprites/Face{expression}.asset");
|
||||
|
||||
@@ -181,7 +181,15 @@ namespace MagnetismHeroes.UnityRuntime.Presentation
|
||||
var original = number;
|
||||
for (int attempt = 0; attempt < 25; attempt++)
|
||||
{
|
||||
if (attempt > 0)
|
||||
if (attempt > 0 && attempt <= 4)
|
||||
{
|
||||
var side = attempt % 2 == 1 ? -1 : 1;
|
||||
number = _camera.WorldToViewportPoint(representative + _camera.transform.right * side * 1.08f
|
||||
+ _camera.transform.up * (attempt <= 2 ? .55f : -.55f));
|
||||
number.x = Mathf.Clamp(number.x, width + .02f, .98f - width);
|
||||
number.y = Mathf.Clamp(number.y, height + .25f, .84f - height);
|
||||
}
|
||||
else if (attempt > 4)
|
||||
{
|
||||
int column = (attempt - 1) % 5;
|
||||
float side = column == 0 ? 0 : column % 2 == 0 ? -column / 2 : (column + 1) / 2;
|
||||
|
||||
@@ -112,8 +112,8 @@ LineRenderer:
|
||||
m_RotationOrder: 4
|
||||
colorGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 0.101960786, g: 0.34901962, b: 0.8, a: 0.9019608}
|
||||
key1: {r: 0.9019608, g: 0.14901961, b: 0.12156863, a: 0.4509804}
|
||||
key0: {r: 0.8, g: 0.14901961, b: 0.12156863, a: 0.9019608}
|
||||
key1: {r: 0.101960786, g: 0.2509804, b: 0.7490196, a: 0.8509804}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
|
||||
Reference in New Issue
Block a user