public void OnAfterTick(bool canOwnershipChange, out bool ownerTeamChanged) { ownerTeamChanged = false; if (!this._flagHolder.SynchronizeCompleted) { return; } bool flag = this._flagHolder.GameEntity.GlobalPosition.DistanceSquared(this._flagTopBoundary.GlobalPosition).ApproximatelyEqualsTo(0.0f); if (canOwnershipChange) { if (!flag) { ownerTeamChanged = true; } else { this._currentDirection = CaptureTheFlagFlagDirection.None; } } else { if (!flag) { return; } this._currentDirection = CaptureTheFlagFlagDirection.None; } }
public void SetMoveNone() { this._currentDirection = CaptureTheFlagFlagDirection.None; MatrixFrame frame = this._flagHolder.GameEntity.GetFrame(); this._flagHolder.SetFrameSynched(ref frame); }
public void SetFlagMotion(float progress, CaptureTheFlagFlagDirection direction, float speed) { this.Flag.Progress = progress; this.Flag.Direction = direction; this.Flag.Speed = speed; this.Flag.UpdateFlag = true; }
public FlagRaisingStatus( float currProgress, CaptureTheFlagFlagDirection direction, float speed) { this.Progress = currProgress; this.Direction = direction; this.Speed = speed; }
public void SetMoveFlag(CaptureTheFlagFlagDirection directionTo) { float duration = 10f - this._flagHolder.RemainingDuration; Debug.Print("Flag[ " + (object)this.FlagIndex + "]: " + (object)directionTo, color: Debug.DebugColor.Green, debugFilter: 64UL); this._currentDirection = directionTo; MatrixFrame frame; if (directionTo != CaptureTheFlagFlagDirection.Up) { if (directionTo != CaptureTheFlagFlagDirection.Down) { throw new ArgumentOutOfRangeException(nameof(directionTo), (object)directionTo, (string)null); } frame = this._flagBottomBoundary.GetFrame(); } else { frame = this._flagTopBoundary.GetFrame(); } this._flagHolder.SetFrameSynchedOverTime(ref frame, duration); }
protected internal override void OnMissionReset() => this._currentDirection = CaptureTheFlagFlagDirection.None;