上海东方渔人码头电子沙盘单机版
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.

31 lines
783 B

3 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoiloverController : MonoBehaviour
{
private OilSpread spread;
private GameObject FireBottom;
void Start()
{
spread = GetComponentInChildren<OilSpread>();
FireBottom = transform.Find("FireBottom").gameObject;
spread.oilSpred = true;
}
// Update is called once per frame
void Update()
{
if (spread.transform.localScale.x >= spread.scale - 0.1f)
{
if (!FireBottom.gameObject.activeSelf)
FireBottom.gameObject.SetActive(true);
if (GetComponent<FireFlowControl>())
{
GetComponent<FireFlowControl>().CatchFire = true;
}
}
}
}