public virtual void CopyFrom(DMKBulletShooterController controller) { this.interval = controller.interval; this.emissionCooldown = controller.emissionCooldown; this.emissionLength = controller.emissionLength; this.positionOffset = controller.positionOffset; this.bulletContainer = controller.bulletContainer; this.gameObject = controller.gameObject; this.tag = controller.tag; this.startFrame = controller.startFrame; this.overallLength = controller.overallLength; this.simulationCount = controller.simulationCount; this.followParentDirection = controller.followParentDirection; this.groupId = controller.groupId; if (controller.shooter != null) { this.shooter = (DMKBulletShooter)ScriptableObject.CreateInstance(controller.shooter.GetType()); this.shooter.parentController = this; this.shooter.CopyFrom(controller.shooter); } else { this.shooter = null; } this.bulletInfo.CopyFrom(controller.bulletInfo); }
public override void CopyFrom(DMKBulletShooter shooter) { if (shooter.GetType() == typeof(DMKNWayShooter)) { DMKNWayShooter cs = shooter as DMKNWayShooter; this.accel1 = cs.accel1; this.accel2 = cs.accel2; this.angleRange = DMKCurveProperty.Copy(cs.angleRange); this.bulletCount = cs.bulletCount; this.radius = DMKCurveProperty.Copy(cs.radius); this.startAngle = DMKCurveProperty.Copy(cs.startAngle); this.targetObject = cs.targetObject; this.trackTarget = cs.trackTarget; } base.CopyFrom(shooter); }
public virtual void CopyFrom(DMKBulletShooter shooter) { //this.modifier = shooter.modifier; }