/// <summary> /// Return flag /// </summary> /// <param name="flag"></param> public override void ReturnFlag(AbstractFlag flag) { base.ReturnFlag(flag); this.EnqueueMessage("You returned the flag"); }
/// <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"); }
/// <summary> /// Drop flag /// </summary> private void DropFlag() { CollisionPool.Instance.AddBody(this.Flag.GetBody()); this.Flag = null; }
/// <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"); }
/// <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"); } }
/// <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; }