add
This commit is contained in:
parent
f6b3a3986d
commit
e68031d5b5
7
xiaofang/Assets/Scenes/firetest.unity.meta
Normal file
7
xiaofang/Assets/Scenes/firetest.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6af5695de08b2b43a158499d37d3fbe
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -24,6 +24,7 @@ public class Fire : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
// 检查玩家是否在范围内且按住灭火键(假设是 "E" 键)
|
||||
|
@ -36,6 +36,7 @@ public class Firelive : MonoBehaviour
|
||||
StartBurning();
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
@ -61,7 +62,7 @@ public class Firelive : MonoBehaviour
|
||||
|
||||
// 初始在pos位置生成小火焰预制体
|
||||
currentFire = Instantiate(minfire, transform.position, Quaternion.identity);
|
||||
transform.GetComponent<Fire>().SetFire(currentFire);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -73,7 +74,7 @@ public class Firelive : MonoBehaviour
|
||||
Destroy(currentFire);
|
||||
currentFire=Instantiate(bigfire, transform.position, Quaternion.identity);
|
||||
Canbig = false;
|
||||
transform.GetComponent<Fire>().SetFire(currentFire);
|
||||
|
||||
StartCoroutine(DelayedSpread());
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user