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.
29 lines
875 B
29 lines
875 B
3 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using AX.TrackRecord;
|
||
|
using AX.MessageSystem;
|
||
|
public class LoadSmogAlpha : MonoBehaviour {
|
||
|
|
||
|
private void Awake()
|
||
|
{
|
||
|
MessageDispatcher.AddListener("LoadSmogAlpha", ChangeSmogAlpha);
|
||
|
}
|
||
|
|
||
|
public void ChangeSmogAlpha(IMessage msg)
|
||
|
{
|
||
|
ObjAttribute oriObj = (ObjAttribute)msg.Data;
|
||
|
if (oriObj.ObjName==name)
|
||
|
{
|
||
|
GetComponent<ParticleSystem>().startColor= new Color(GetComponent<ParticleSystem>().startColor.r, GetComponent<ParticleSystem>().startColor.g, GetComponent<ParticleSystem>().startColor.b,oriObj.lineSize);
|
||
|
Debug.Log(GetComponent<ParticleSystem>().startColor + " sssssss");
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
private void OnDestroy()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("LoadSmogAlpha", ChangeSmogAlpha);
|
||
|
}
|
||
|
}
|