示例#1
0
 public void SendTDMInitEvent(NodeAddedEvent e, TeamBattleNode battle, [Context, Combine] RemoteTankTeamNode tank, [Context, JoinByTank] WeaponNode weapon, [JoinAll] SelfBattleUserInTeamNode selfBattleUser, [Context, JoinAll] SingleNode <TankOutlineColorsComponent> colors)
 {
     if (!selfBattleUser.Entity.HasComponent <UserInBattleAsSpectatorComponent>())
     {
         base.ScheduleEvent <InitTeamMatchEvent>(tank);
     }
 }
示例#2
0
 public void InitTDMTankPartsForOutlineEffect(InitTeamMatchEvent e, RemoteTankTeamNode remoteTankTeam, [JoinByTank] WeaponNode weapon, [JoinByTeam] TeamNode team, [JoinAll] SelfBattleUserInTeamNode selfBattleUser, [JoinByTeam] TeamNode selfTeam, [JoinAll] SingleNode <TankOutlineColorsComponent> colors)
 {
     this.InitTankPartsForOutlineEffect(remoteTankTeam, weapon);
     if (selfTeam.Entity.Equals(team.Entity))
     {
         remoteTankTeam.tankPartOutlineEffectUnity.MaterialForTankPart.SetColor("_OutlineColor", colors.component.Allies);
         weapon.tankPartOutlineEffectUnity.MaterialForTankPart.SetColor("_OutlineColor", colors.component.Allies);
     }
     else
     {
         remoteTankTeam.tankPartOutlineEffectUnity.MaterialForTankPart.SetColor("_OutlineColor", colors.component.Enemies);
         weapon.tankPartOutlineEffectUnity.MaterialForTankPart.SetColor("_OutlineColor", colors.component.Enemies);
     }
 }