You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
3.5 KiB
114 lines
3.5 KiB
using AX.TrackRecord; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
public class JiantouColorChanged : MonoBehaviour |
|
{ |
|
|
|
// Use this for initialization |
|
void Start() |
|
{ |
|
|
|
} |
|
|
|
// Update is called once per frame |
|
void Update() |
|
{ |
|
changeColor(); |
|
} |
|
private void changeColor() |
|
{ |
|
if (gameObject.name.Contains("jingong")) |
|
{ |
|
if (JiantouColorControl.ToolName.Equals("JinGong") || LoadManager.Instance.IsPlayBacking) |
|
{ |
|
if (JiantouColorControl.highLight ) |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0.15f, 0, 0); |
|
} |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
} |
|
if (gameObject.name.Contains("chetui") ) |
|
{ |
|
if (JiantouColorControl.ToolName.Equals("CheTui") || LoadManager.Instance.IsPlayBacking) |
|
{ |
|
if (JiantouColorControl.highLight) |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0, 1, 0); |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0, 0.15f, 0); |
|
} |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0, 1, 0); |
|
} |
|
} |
|
if (gameObject.name.Contains("ssrline")) |
|
{ |
|
if (JiantouColorControl.ToolName.Equals("SSShuiDai") || LoadManager.Instance.IsPlayBacking) |
|
{ |
|
if (JiantouColorControl.highLight) |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0.15f, 0, 0); |
|
} |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
} |
|
if (gameObject.name.Contains("fengexian")) |
|
{ |
|
if (JiantouColorControl.ToolName.Equals("FenGeXian")) |
|
{ |
|
if (JiantouColorControl.highLight) |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0.15f, 0, 0); |
|
} |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
} |
|
if (gameObject.name.Contains("dujiexian")) |
|
{ |
|
if (JiantouColorControl.ToolName.Equals("DuJieXian")) |
|
{ |
|
if (JiantouColorControl.highLight) |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(0.15f, 0, 0); |
|
} |
|
} |
|
else |
|
{ |
|
gameObject.GetComponent<Renderer>().material.color = new Color(1, 0, 0); |
|
} |
|
} |
|
|
|
} |
|
}
|
|
|