//be careful when cloning this controller as we will need to reset the target actor - assuming the clone attaches to a different target public override object GetDeepCopy() { IController clone = new ThirdPersonController("clone - " + this.ID, //deep this.ControllerType, //deep this.TargetActor as Actor, //shallow - a ref this.distance, //deep this.scrollSpeedDistanceMultiplier, //deep this.elevationAngle, //deep this.scrollSpeedElevationMultiplier, //deep this.translationLerpSpeed, //deep this.lookLerpSpeed, //deep this.mouseManager); //shallow - a ref clone.SetControllerPlayStatus(this.PlayStatusType); return(clone); }
public override bool Equals(object obj) { ThirdPersonController other = obj as ThirdPersonController; if (other == null) { return(false); } else if (this == other) { return(true); } return(this.elevationAngle.Equals(other.ElevationAngle) && this.distance.Equals(other.Distance) && this.translationLerpSpeed.Equals(other.TranslationLerpSpeed) && this.lookLerpSpeed.Equals(other.LookLerpSpeed) && base.Equals(obj)); }