private CAvatar CheckValid(CAvatar aAvatar) { if (aAvatar.CheckValid()) { return(aAvatar); } return(this); }
internal CAvatar RotateZ(float aRadians) { var a1 = this.AxisAngles; var a2 = new Vector3(a1.X, a1.Y, a1.Z + aRadians); var a = new CAvatar(this.Game, this.CamPos, a2); return(a); }
// "Absolute" version der Methode "LookLeftRight" private CAvatar LookLeftRightAbsolute(float aRadians) { var a1 = this.AxisAngles; var a2 = new Vector3(a1.X, a1.Y + aRadians, a1.Z); var a = new CAvatar(this.Game, this.CamPos, a2); return(a); }
internal CAvatar MoveToOffset(Vector3 aMoveVector) { if (this.AccumulativeIsEnabled) { var aCamPos = this.CamPos + aMoveVector; var aCamTarget = this.CamTarget + aMoveVector; var aAvatar = new CAvatar(this.Game, aCamPos, aCamTarget, this.UpVector, this.AxisX, this.AxisY); return(aAvatar); } else { var aNewCameraPosition = this.CamPos + aMoveVector; var aAvatar = new CAvatar(this.Game, aNewCameraPosition, this.AxisAngles); return(aAvatar); } }
internal static CAvatar Load(CGame aGame) { var aFileInfo = FileInfo; if (aFileInfo.Exists) { try { var aMemoryStream = new MemoryStream(File.ReadAllBytes(aFileInfo.FullName)); var aAvatar = Read(aGame, aMemoryStream); return(aAvatar); } catch (Exception) { return(CAvatar.Default(aGame)); } } return(CAvatar.Default(aGame)); }
=> this; //throw new NotImplementedException(); // => new CAvatar(this.CamPos + this.CamTarget.RotateZ(MathHelper.ToRadians(90)) * new Vector3(aDelta),) internal CAvatar MoveAlongViewAngle(float aDistance) { if (this.AccumulativeIsEnabled) { var aMoveVector = this.CamTargetOffset; var aLonger = aMoveVector.MakeLongerDelta(aDistance); var aNewCameraPosition = this.CamPos + aLonger; var aNewCameraTarget = this.CamTarget + aLonger; var aAvatar = new CAvatar(this.Game, aNewCameraPosition, aNewCameraTarget, this.UpVector, this.AxisX, this.AxisY); return(aAvatar); } else if (aDistance != 0f) { var aMoveVector = this.CamTargetOffset; var aLonger = aMoveVector.MakeLongerDelta(aDistance); var aNewCameraPosition = this.CamPos + aLonger; var aAvatar = new CAvatar(this.Game, aNewCameraPosition, this.AxisAngles); return(aAvatar); } else { return(this); } }
protected override void LoadContent() { this.Avatar = CAvatar.Load(this); this.MonoFacade.MonoModels.LoadContent(); base.LoadContent(); }