void Start() { // Hide cursor at runtime. #if !UNITY_EDITOR Cursor.visible = false; #endif // Try to activate the last two displays. var displayCount = Display.displays.Length; if (displayCount > 1) { Display.displays[displayCount - 2].Activate(); Display.displays[displayCount - 1].Activate(); } // Initialize the effect controllers. _fxControllers = new FxController[_effectGroups.Length]; for (var i = 0; i < _effectGroups.Length; i++) { _fxControllers[i] = new FxController(_effectGroups[i]); } // Retrieve the reference to the wall fx. _wallFx = FindObjectsOfType <WallFx>(); // Retrieve the reference to the main camera post fx. _postFx = FindObjectOfType <PostFx>(); }
void ApplyDeathFX() { FxController fxController = FxManager.GetFume(); fxController.transform.position = core.transform.position; fxController.ActivateFx(); }
public static FxController GetFume() { FxController fxController = null; foreach (FxController fx in fxList) { if (!fx.isActive) { fxController = fx; break; } } if (!fxController) { fxController = Instantiate(fumePrefab).GetComponent <FxController>(); fxList.Add(fxController); } return(fxController); }