protected virtual void FireProjectile() { if (m_TrackingTarget == null) { return; } if (attackerData.IsMultiAttack) { List <EntityTargetable> enemies = towerTargetter.GetAllTargets(); m_Launcher.Launch( enemies, attackerData, projectileData, epicenter.position, projectilePoints); } else { m_Launcher.Launch( m_TrackingTarget, attackerData, projectileData, epicenter.position, projectilePoints); } if (randomSound != null) { GameEntry.Sound.PlaySound(randomSound.GetRandomSound(), ownerEntity); } }
private static void OpenSelectedFolderAction(string folder) { using (ILauncher launcher = New <ILauncher>()) { launcher.Launch(folder); } }
public override IEnumerator TryAttack() { isAttacking = true; proj.Launch(this); rocketFire.Play(); yield return(new WaitForSeconds(AttackSpeed)); isAttacking = false; }
protected override void OnStart() { _projectile = _launcher.NextToLaunch; _projectile.ContactMonitor = true; _projectile.ContactsReported = Math.Max(_projectile.ContactsReported, 2); _projectile.Connect(SignalNames.RigidBody.BodyEntered, this, nameof(OnBodyEntered)); _projectile.Connect(SignalNames.Node.Exiting, this, nameof(OnProjectileExit), new Array { _projectile }); _launcher.Launch(new LaunchInfo(_launchInfo.Location, _launchInfo.Velocity)); }
/// <summary> /// Common logic when attacking /// </summary> protected virtual void FireProjectile() { if (m_TrackingEnemy == null) { return; } if (isMultiAttack) { List <Targetable> enemies = m_Targetter.GetAllTargets(); m_Launcher.Launch(enemies, projectile, projectilePoints); } else { m_Launcher.Launch(m_TrackingEnemy, damagerProjectile.gameObject, projectilePoints); } if (randomAudioSource != null) { randomAudioSource.PlayRandomClip(); } }
private void FireProjectile() { if (targetter.CurrentTarget == null) { return; } if (towerConfiguration.fireParticles != null && _fireCoroutine == null) { _fireCoroutine = StartCoroutine(FireParticles()); } if (towerConfiguration.multiAttack) { var enemies = targetter.AllTargets.Take(towerConfiguration.maxEnemies).ToList(); _launcher.Launch(enemies, towerConfiguration.projectile, projectilePoints); } else { _launcher.Launch(targetter.CurrentTarget, towerConfiguration.projectile, projectilePoints); } }
/// <summary> /// Common logic when attacking /// </summary> protected virtual void FireProjectile() { if (m_TrackingEnemy == null) { return; } if (isMultiAttack) { List <Targetable> enemies = towerTargetter.GetAllTargets(); m_Launcher.Launch(enemies, projectile, projectilePoints); } else { m_Launcher.Launch(m_TrackingEnemy, damagerProjectile.gameObject, projectilePoints); } if (randomAudioSource != null) { randomAudioSource.PlayRandomClip(); //WWiseEventPlayer myEventPlayer = gameObject.AddComponent(typeof(WWiseEventPlayer)) as WWiseEventPlayer; //myEventPlayer.PlayWwiseEvent("ui_objectFireProjectile"); } }
private void Shoot() { bool isInRange = CheckIfInRangeOfTower(currentTarget.transform.position); if (isInRange) { launcher.Launch(currentTarget); reloadCooldown = 1f / FireRate.Value; } else { currentTarget = null; } }
public void Fire() { if (!CanFire()) { return; } if (!launcherSettings.UsedByAi) { heat += heatPerShot; } launcher.Launch(this); }
public bool Shoot() { float currentTime = Time.time; if (currentTime < _lastLaunchTime + _coolTime) { // クールタイム中であれば失敗 return(false); } _launcher.Launch(); // 発射時間を更新 _lastLaunchTime = currentTime; return(true); }
public static void Main(string[] args) { Assembly binaries = GetAssembly(); if (binaries == null) { MessageBox.Show( "First-time download of binaries failed.\n\n" + "This could either be because the server is down or your\n" + "internet connection is being silly.", "FAIL"); } else { ILauncher launcher = binaries.CreateInstance(LauncherClassName) as ILauncher; launcher.Launch(); } }
public bool Shoot() { float currentTime = _timer.Time; if (currentTime < _lastLaunchTime + _coolTime) { // クールタイム中であれば失敗 return(false); } if (_blocker.Block()) { // 発射遮断中であれば失敗 return(false); } _launcher.Launch(); // 発射時間を更新 _lastLaunchTime = currentTime; return(true); }
public static void TestPurgeInactive() { TypeMap.Register.New <ILauncher>(() => new FakeLauncher()); ProcessState ps = new ProcessState(); ActiveFile activeFile1 = new ActiveFile(New <IDataStore>(@"C:\encrypted.axx"), New <IDataStore>(@"C:\decrypted.txt"), new LogOnIdentity("passphrase"), ActiveFileStatus.NotDecrypted, new V1Aes128CryptoFactory().CryptoId); ILauncher launcher1 = New <ILauncher>(); launcher1.Launch(activeFile1.EncryptedFileInfo.FullName); ps.Add(launcher1, activeFile1); Assert.That(ps.HasActiveProcess(activeFile1), Is.True); FakeLauncher fakeLauncher1 = (FakeLauncher)launcher1; fakeLauncher1.HasExited = true; Assert.That(ps.HasActiveProcess(activeFile1), Is.False); fakeLauncher1.HasExited = false; Assert.That(ps.HasActiveProcess(activeFile1), Is.True); fakeLauncher1.HasExited = true; Assert.That(ps.HasActiveProcess(activeFile1), Is.False); ActiveFile activeFile2 = new ActiveFile(New <IDataStore>(@"C:\encrypted2.axx"), New <IDataStore>(@"C:\decrypted2.txt"), new LogOnIdentity("passphrase"), ActiveFileStatus.NotDecrypted, new V1Aes128CryptoFactory().CryptoId); ILauncher launcher2 = New <ILauncher>(); launcher2.Launch(activeFile2.EncryptedFileInfo.FullName); ps.Add(launcher2, activeFile2); Assert.That(ps.HasActiveProcess(activeFile1), Is.False); fakeLauncher1.HasExited = false; Assert.That(ps.HasActiveProcess(activeFile1), Is.False); }
public void LaunchGame(string gameName, string systemName) { _launcher.Launch(gameName); }
public void Fire() { nextFire = Time.time + refreshRate; launcher.Launch(this); }
private void FireWeapon() { nextFireTime = Time.time + fireRefreshRate; launcher.Launch(this); }
private bool LaunchLocal() { string dbFile = m_resultsFileTextBox.Text; if (!m_launcher.CheckParams()) { return(false); } //connect to data engine before launching the process -- we don't want to launch if this fails IDataEngine data = null; if (m_connectCheckBox.Checked) { try { this.Cursor = Cursors.WaitCursor; if (m_sqliteRadio.Checked) { data = new SQLiteEngine(dbFile, true); } else if (m_sqliteMemoryRadio.Checked) { data = new SQLiteMemoryEngine(); } else { throw new NotImplementedException(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Launch Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } finally { this.Cursor = Cursors.Default; } } if (!m_launcher.Launch()) { if (data != null) { data.Dispose(); } return(false); } //connect, if we're asked to if (m_connectCheckBox.Checked) { ConnectProgress progress = new ConnectProgress("localhost", m_launcher.ListenPort, data, 10); progress.ShowDialog(this); if (progress.Client != null) { Connection conn = new Connection(data); conn.Executable = m_launcher.Name; conn.RunClient(progress.Client); //TODO: set options like auto snapshot frequency conn.SetAutoSnapshots(10000, false); var profilerWindow = new ProfilerWindow(m_mainWindow, conn); profilerWindow.Show(); TypeEntry visEntry = m_visualizerCombo.SelectedItem as TypeEntry; if (visEntry != null && visEntry.Type != null) { profilerWindow.AddVisualizer(visEntry.Type); } profilerWindow.BringToFront(); } else { //connection failed, shut down the storage data.Dispose(); } } return(true); }