public void HideFlag(NodeRemoveEvent e, CarriedFlagNode flag1, [JoinByTank] TankNode user, [JoinByUser] FlagIndicatorNode flagIndicator, CarriedFlagNode flag2, [JoinByTank] ICollection <CarriedFlagNode> flags) { if (flags.Count <= 1) { flagIndicator.scoreTableFlagIndicator.SetFlagIconActivity(false); } }
public void FlagDropRequest(UpdateEvent e, CarriedFlagNode flag, [JoinByTank] SelfTankNode tank, [JoinByBattle] SingleNode <RoundActiveStateComponent> round, [JoinByBattle] SingleNode <CTFConfigComponent> ctfConfig) { if (InputManager.GetActionKeyDown(CTFActions.DROP_FLAG)) { base.ScheduleEvent <SendTankMovementEvent>(tank); base.NewEvent <FlagDropRequestEvent>().Attach(flag).Attach(tank).Schedule(); base.NewEvent <TankFlagCollisionEvent>().Attach(flag).Attach(tank).ScheduleDelayed(ctfConfig.component.enemyFlagActionMinIntervalSec); } }
public void PickupFlag(NodeAddedEvent e, CarriedFlagNode flag, [Context, JoinByTank] TankNode tank, [JoinByTank] WeaponNode weapon, [JoinByBattle] SingleNode <CTFConfigComponent> ctfConfig) { if (flag.teamGroup.Key != tank.teamGroup.Key) { Transform transform = flag.flagInstance.FlagInstance.transform; transform.parent = weapon.weaponVisualRoot.transform; transform.localPosition = FLAG_MOUNT; Transform child = transform.GetChild(0); if ((transform.parent != null) && (child != null)) { transform.localEulerAngles = new Vector3(0f, 0f, 0f); child.transform.localScale = new Vector3(ctfConfig.component.flagScaleOnTank, ctfConfig.component.flagScaleOnTank, ctfConfig.component.flagScaleOnTank); transform.localScale = new Vector3(1f, 1f, 1f); child.transform.localPosition = new Vector3(0f, ctfConfig.component.flagOriginPositionOnTank, 0f); transform.GetComponent <Sprite3D>().scale = 0f; FlagVisualRotate component = transform.GetComponent <FlagVisualRotate>(); component.timerUpsideDown = ctfConfig.component.upsideDownMarkTimer; component.scale = ctfConfig.component.upsideDownMarkScale; component.origin = ctfConfig.component.upsideDownMarkOrigin; component.distanceForRotateFlag = ctfConfig.component.distanceForRotateFlag; component.tank = tank.tankVisualRoot.transform; } } }
public void PickupFlag(NodeAddedEvent e, CarriedFlagNode flagNode) { setAlpha(flagNode.flagInstance, 0.5f); }
public void ShowFlag(NodeAddedEvent e, [Combine] FlagIndicatorNode flagIndicator, [Context, JoinByUser] TankNode user, [Context, JoinByTank] CarriedFlagNode flag) { flagIndicator.scoreTableFlagIndicator.SetFlagIconActivity(true); }