上海苏宁宝丽嘉酒店,2020.11.17 15:30改为单机版本,以后合成单机版本可以以此版本为模板
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
1.2 KiB

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class FireFlowControl : MonoBehaviour
{
public bool CatchFire;
public void GetFireFlowData(BoiloverData data)
{
data.name = gameObject.name;
data.boxsize = GetComponent<BoxCollider>().size;
data.bottomScale = transform.Find("BottomOil").transform.localScale;
data.nowScale = transform.Find("BottomOil").GetComponent<OilSpread>().ranyouScale;
data.shapRadius = transform.Find("FireBottom").GetComponent<OilParticleControl>().NowShape;
data.catchFire = CatchFire;
}
public void SetFireFlowData(BoiloverData data)
{
GetComponent<BoxCollider>().size = data.boxsize;
transform.Find("BottomOil").transform.localScale = data.bottomScale;
transform.Find("BottomOil").GetComponent<OilSpread>().ranyouScale = data.nowScale;
transform.Find("FireBottom/fire (8)").GetComponent<OilParticleControl>().NowShape = data.shapRadius;
transform.Find("FireBottom").GetComponent<OilParticleControl>().NowShape = data.shapRadius;
CatchFire = data.catchFire;
}
}