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.
36 lines
1.6 KiB
36 lines
1.6 KiB
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using AX.MessageSystem;
|
||
|
using System;
|
||
|
using AX.TrackRecord;
|
||
|
/// <summary>
|
||
|
/// 挂载在每个水炮上
|
||
|
/// 获取每个水炮身上的位置,旋转,任务信息
|
||
|
/// </summary>
|
||
|
|
||
|
public class ShuiPaoMessage : MessageBehaviour
|
||
|
{
|
||
|
private Vector3 InitialRotation;
|
||
|
private Vector3 InitialChildRotation;
|
||
|
void Start()
|
||
|
{
|
||
|
InitialRotation = gameObject.transform.localEulerAngles;
|
||
|
//InitialChildRotation = gameObject.transform.FindChild("XF_SP_/XF_SP").localEulerAngles;
|
||
|
InitialChildRotation = GetComponent<SPControl>().part1.transform.localEulerAngles;
|
||
|
}
|
||
|
protected override void Execute(IMessage message)
|
||
|
{
|
||
|
if (gameObject.name.Contains("XF_SPZ"))
|
||
|
{
|
||
|
gameObject.transform.Find("info/Function").GetComponent<TextMesh>().text = "待命";
|
||
|
gameObject.transform.Find("XF_SP_/XF_SP").transform.Find("Hose/WaterStraight(Clone)").GetComponent<ParticleSystemControl>().waterStraightScale = 1;
|
||
|
//gameObject.transform.FindChild("XF_SP_/XF_SP").transform.FindChild("Hose").GetComponent<Scale>().UpdateScale();
|
||
|
//gameObject.transform.FindChild("XF_SP_/XF_SP").transform.FindChild("Hose/WaterStraight").GetComponent<EllipsoidParticleEmitter>().maxSize = 0.6f;
|
||
|
gameObject.transform.Find("XF_SP_/XF_SP").transform.Find("Hose").gameObject.SetActive(false);
|
||
|
GetComponent<SPControl>().part1.transform.localEulerAngles = InitialChildRotation;
|
||
|
gameObject.transform.localEulerAngles = InitialRotation;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|