void Start() { ControllerInputManager.GetInstance().OnStartDown += PressNext; pressStart.SetActive(false); for (int i = 0; i < waves.Count; i++) { waves[i].WaveDelay = waveDelayList[i >= waveDelayList.Length?waveDelayList.Length - 1:i]; } NextWave(); }
void Start() { m_controllerInstance = ControllerInputManager.GetInstance(); m_controllerInstance.OnADown += onADown; m_controllerInstance.OnXDown += onXDown; m_controllerInstance.OnYDown += onYDown; m_controllerInstance.OnBDown += onBDown; m_controllerInstance.OnLSChange += Move; m_controllerInstance.OnRBDown += BoostOn; m_controllerInstance.OnRBUp += BoostOff; rb = GetComponent <Rigidbody2D>(); m_curInteract = null; heldResource = null; }
void Start() { levelTextList = new List <Text>(); foreach (Transform child in levelSelectImage.transform) { Text t = child.GetComponent <Text> (); if (t != null) { levelTextList.Add(child.GetComponent <Text>()); } } m_controllerInstance = ControllerInputManager.GetInstance(); m_controllerInstance.OnADown += onADown; m_controllerInstance.OnLSChange += onLSChange; isInLevelSelect = false; mainImage.gameObject.SetActive(true); levelSelectImage.gameObject.SetActive(false); selectedLevel = 0; levelTextList[selectedLevel].color = Color.white; joystickChanged = false; }
private void OnDestroy() { ControllerInputManager.GetInstance().OnStartDown -= PressNext; }