private void DeviceConnectedEvent(USBH_Device device) { if (device.PRODUCT_ID == 0x0202 && device.VENDOR_ID == 0x1130 && device.INTERFACE_INDEX == 0) { Debug.Print("Device connected..."); launcherPod = new MisileLauncher(device); // Notify the user that misile launcher is available multicolorLed.TurnGreen(); } }
private void Start() { constForce = GetComponent <ConstantForce>(); rigBod = GetComponent <Rigidbody>(); constForce.relativeForce = flySpeed; launcher = GameObject.FindGameObjectWithTag("Improved").GetComponentInChildren <MisileLauncher>(); placeToFly = launcher.nextMisilePos; explosionArea = Instantiate(explosionAreaPrefab, placeToFly, Quaternion.identity); inpact = explosionArea.GetComponent <MisileInpact>(); inpact.misil = GetComponent <Misil>(); inpact.maxScale = explosionRadius * 2; }
public void Initialize() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); GM = GameObject.FindGameObjectWithTag("Managers").GetComponent <GameManager>(); laser = GetComponentInChildren <LaserGun>(); flameThrower = GetComponentInChildren <FlameThrower>(); hJump = GetComponentInChildren <HyperJump>(); hDash = GetComponentInChildren <HyperDash>(); mLauncher = GetComponentInChildren <MisileLauncher>(); absorb = GetComponentInChildren <Absorb>(); laser.Initialize(); flameThrower.Initialize(); hJump.Initialize(); hDash.Initialize(); mLauncher.Initialize(); absorb.Initialize(); }