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 void CopyFrom(DMKBulletInfo prototype, float speedMultiplier = 1f) { this.bulletSprite = prototype.bulletSprite; this.damage = prototype.damage; this.speed = DMKCurveProperty.Copy(prototype.speed, speedMultiplier); this.accel = DMKCurveProperty.Copy(prototype.accel); this.angularAccel = DMKCurveProperty.Copy(prototype.angularAccel); this.bulletColor = prototype.bulletColor; this.died = false; this.useScaleCurve = prototype.useScaleCurve; this.scaleCurveX = DMKUtil.CopyCurve(prototype.scaleCurveX); this.scaleCurveY = DMKUtil.CopyCurve(prototype.scaleCurveY); this.collisionRect = prototype.collisionRect; this.maxLifetime = prototype.maxLifetime; this.lifeFrame = 0; }