Example #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");
 }
Example #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");
 }
Example #3
0
 /// <summary>
 /// Drop flag
 /// </summary>
 private void DropFlag()
 {
     CollisionPool.Instance.AddBody(this.Flag.GetBody());
     this.Flag = null;
 }
Example #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");
 }
Example #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");
     }
 }
Example #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;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="flag"></param>
 public CollisionBehaviors(AbstractFlag flag)
 {
     this._flag = flag;
 }