void stopFire() { monsterFireController fController = GetComponentInChildren <monsterFireController>(); if (fController == null) { Debug.Log("Could not find firecontroller"); } fController.turnOffFX(); Invoke("setDeath", 2f); }
void playFire() { monsterFireController fController = GetComponentInChildren <monsterFireController>(); if (fController == null) { Debug.Log("Could not find firecontroller"); } fController.turnOnFX(); Invoke("removeBody", 2f); Invoke("stopFire", 2.5f); }
// Use this for initialization void Start() { switcherScript = GetComponentInChildren <lantern_01_matswitcher>(); if (switcherScript == null) { Debug.Log("SwitcherScript is ull"); } GameObject player = GameObject.FindGameObjectWithTag("Player"); pScript = player.GetComponent <playerControllerCopy>(); GameObject traveller = GameObject.FindGameObjectWithTag("Traveller"); tMovement = traveller.GetComponent <travellerMovement>(); if (pScript == null) { Debug.Log("pScript is nnull"); } lampLight = GetComponentInChildren <Light>(); if (lampLight == null) { Debug.Log("Could not find light in child!"); } mfController = GetComponentInChildren <monsterFireController>(); if (mfController == null) { Debug.Log("Could not find monsterfire effect controoller"); } //startIntensity = lampLight.intensity; }