summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/PooledMapIcon.cs
blob: 8e75ff329bb50d16dff8b29b49ba3033c969b3f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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();
	}
}