Exemplo n.º 1
0
 /// <summary>
 /// Return flag
 /// </summary>
 /// <param name="flag"></param>
 public override void ReturnFlag(AbstractFlag flag)
 {
     base.ReturnFlag(flag);
     this.EnqueueMessage("You returned the flag");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Pick up flag
 /// </summary>
 /// <param name="flag"></param>
 public override void PickUpFlag(AbstractFlag flag)
 {
     base.PickUpFlag(flag);
     this.EnqueueMessage("You picked up the flag");
 }
Exemplo n.º 3
0
 /// <summary>
 /// Drop flag
 /// </summary>
 private void DropFlag()
 {
     CollisionPool.Instance.AddBody(this.Flag.GetBody());
     this.Flag = null;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Return flag
 /// </summary>
 /// <param name="flag"></param>
 public virtual void ReturnFlag(AbstractFlag flag)
 {
     flag.ResetPosition();
     ScreenController.Instance.ActiveScreen.EnqueueMessage(flag.GetTeam().GetName() + " flag was returned");
 }
Exemplo n.º 5
0
 /// <summary>
 /// Pick up flag
 /// </summary>
 /// <param name="flag"></param>
 public virtual void PickUpFlag(AbstractFlag flag)
 {
     if (this.Flag == null)
     {
         this.Flag = flag;
         CollisionPool.Instance.RemoveBody(flag.GetBody());
         ScreenController.Instance.ActiveScreen.EnqueueMessage(flag.GetTeam().GetName() + " flag was taken");
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Capture flag
 /// </summary>
 public virtual void CaptureFlag()
 {
     this.Team.CaptureFlag();
     this.Flag.ResetPosition();
     CollisionPool.Instance.AddBody(this.Flag.GetBody());
     ScreenController.Instance.ActiveScreen.EnqueueMessage(this.Team.GetName() + " captured " + this.Flag.GetTeam().GetName() + " flag");
     this.Flag = null;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="flag"></param>
 public CollisionBehaviors(AbstractFlag flag)
 {
     this._flag = flag;
 }