Esempio n. 1
0
 private void UpdateStreamWeaponHitFeedback(StreamHitNode weapon, SelfTankTeamNode tank)
 {
     if (weapon.streamHit.TankHit == null)
     {
         weapon.Entity.RemoveComponentIfPresent <StreamHitEnemyFeedbackComponent>();
         weapon.Entity.RemoveComponentIfPresent <StreamHitTeammateFeedbackComponent>();
     }
     else if (tank.teamGroup.Key == weapon.streamHit.TankHit.Entity.GetComponent <TeamGroupComponent>().Key)
     {
         weapon.Entity.AddComponentIfAbsent <StreamHitTeammateFeedbackComponent>();
         weapon.Entity.RemoveComponentIfPresent <StreamHitEnemyFeedbackComponent>();
     }
     else
     {
         weapon.Entity.AddComponentIfAbsent <StreamHitEnemyFeedbackComponent>();
         weapon.Entity.RemoveComponentIfPresent <StreamHitTeammateFeedbackComponent>();
     }
 }
Esempio n. 2
0
 public void BeginStreamWeaponHitFeedback(NodeAddedEvent e, StreamHitNode weapon, [Context, JoinByTank] SelfTankTeamNode tank, [Context, JoinByBattle] TeamBattleNode battle)
 {
     this.UpdateStreamWeaponHitFeedback(weapon, tank);
 }
Esempio n. 3
0
 public void CollectTargetsForEMPEffectInTeamBattle(NodeAddedEvent e, EMPEffectNode emp, [JoinByTank] SelfTankTeamNode selfTank, [JoinByTeam] TeamNode selfTeam, [JoinByBattle] TeamBattleNode battle, [JoinByBattle, Combine] TeamNode team)
 {
     if (!team.Entity.Equals(selfTeam.Entity))
     {
         CollectTargetsInRadius eventInstance = new CollectTargetsInRadius {
             Radius = emp.empEffect.Radius
         };
         Node[] nodes = new Node[] { emp, selfTank, battle, team };
         base.NewEvent(eventInstance).AttachAll(nodes).Schedule();
     }
 }
Esempio n. 4
0
 public void CollectTargetsForEMPEffectInTeamBattle(CollectTargetsInRadius e, EffectNode any, SelfTankTeamNode selfTank, TeamBattleNode battle, TeamNode team, [JoinByTeam] ICollection <RemoteTankNode> otherTanks)
 {
     this.CollectTargetsForEMP(e, selfTank, otherTanks);
 }
 public void CollectTargetsInTeamBattle(NodeAddedEvent e, ExplosiveMassEffectNode effect, [JoinByTank] SelfTankTeamNode selfTank, [JoinByTeam] TeamNode selfTeam, [JoinByBattle] TeamBattleNode battle, [JoinByBattle, Combine] TeamNode team)
 {
     if (!team.Entity.Equals(selfTeam.Entity))
     {
         CollectTargetsInRadius eventInstance = new CollectTargetsInRadius {
             Radius = effect.explosiveMassEffect.Radius
         };
         Node[] nodes = new Node[] { effect, selfTank, battle, team };
         base.NewEvent(eventInstance).AttachAll(nodes).ScheduleDelayed(((float)effect.explosiveMassEffect.Delay) / 1000f);
     }
 }