示例#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");
 }
示例#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");
 }
示例#3
0
 /// <summary>
 /// Drop flag
 /// </summary>
 private void DropFlag()
 {
     CollisionPool.Instance.AddBody(this.Flag.GetBody());
     this.Flag = null;
 }
示例#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");
 }
示例#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");
     }
 }
示例#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;
 }