From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- Client/Assembly-CSharp/PooledMapIcon.cs | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Client/Assembly-CSharp/PooledMapIcon.cs (limited to 'Client/Assembly-CSharp/PooledMapIcon.cs') diff --git a/Client/Assembly-CSharp/PooledMapIcon.cs b/Client/Assembly-CSharp/PooledMapIcon.cs new file mode 100644 index 0000000..8e75ff3 --- /dev/null +++ b/Client/Assembly-CSharp/PooledMapIcon.cs @@ -0,0 +1,35 @@ +using System; +using UnityEngine; + +public class PooledMapIcon : PoolableBehavior +{ + public float NormalSize = 0.3f; + + public int lastMapTaskStep = -1; + + public SpriteRenderer rend; + + public AlphaPulse alphaPulse; + + public void Update() + { + if (this.alphaPulse.enabled) + { + float num = Mathf.Abs(Mathf.Cos((this.alphaPulse.Offset + Time.time) * 3.1415927f / this.alphaPulse.Duration)); + if ((double)num > 0.9) + { + num -= 0.9f; + num = this.NormalSize + num; + base.transform.localScale = new Vector3(num, num, num); + } + } + } + + public override void Reset() + { + this.lastMapTaskStep = -1; + this.alphaPulse.enabled = false; + this.rend.material.SetFloat("_Outline", 0f); + base.Reset(); + } +} -- cgit v1.1-26-g67d0