public void Modify(ModifyExplodData modifydata) { if (modifydata == null) { throw new ArgumentNullException("data"); } if (modifydata.Id != Data.Id) { throw new ArgumentException("data"); } if (modifydata.Scale != null) { Data.Scale = modifydata.Scale.Value; CurrentScale = Data.Scale; } if (modifydata.SpritePriority != null) { Data.SpritePriority = modifydata.SpritePriority.Value; DrawOrder = Data.SpritePriority; } if (modifydata.DrawOnTop != null) { Data.DrawOnTop = modifydata.DrawOnTop.Value; if (Data.DrawOnTop) { DrawOrder = 11; } } if (modifydata.RemoveOnGetHit != null) { Data.RemoveOnGetHit = modifydata.RemoveOnGetHit.Value; } if (modifydata.SuperMove != null) { Data.SuperMove = modifydata.SuperMove.Value; } if (modifydata.SuperMoveTime != null) { Data.SuperMoveTime = modifydata.SuperMoveTime.Value; } if (modifydata.PauseTime != null) { Data.PauseTime = modifydata.PauseTime.Value; } if (modifydata.RemoveTime != null) { Data.RemoveTime = modifydata.RemoveTime.Value; } if (modifydata.BindTime != null) { Data.BindTime = modifydata.BindTime.Value; } if (modifydata.Acceleration != null) { Data.Acceleration = modifydata.Acceleration.Value; CurrentAcceleration = Data.Acceleration; } if (modifydata.Velocity != null) { Data.Velocity = modifydata.Velocity.Value; CurrentVelocity = Data.Velocity; } if (modifydata.IgnoreHitPause != null) { Data.IgnoreHitPause = modifydata.IgnoreHitPause.Value; } if (modifydata.Flip != null) { Data.Flip = modifydata.Flip.Value; } if (modifydata.PositionType != null) { Data.PositionType = modifydata.PositionType.Value; } if (modifydata.Location != null) { Data.Location = modifydata.Location.Value; } if (modifydata.Random != null) { Data.Random = modifydata.Random.Value; } if (modifydata.Transparency != null) { Data.Transparency = modifydata.Transparency.Value; Transparency = Data.Transparency; } if (modifydata.PositionType != null || modifydata.Location != null) { CurrentLocation = GetStartLocation(); } if (modifydata.Flip != null) { CurrentFacing = GetStartFacing(); } /* * Data.CommonAnimation = data.CommonAnimation; * Data.AnimationNumber = data.AnimationNumber; */ }
public void Modify(ModifyExplodData modifydata) { if (modifydata == null) throw new ArgumentNullException("data"); if (modifydata.Id != Data.Id) throw new ArgumentException("data"); if (modifydata.Scale != null) { Data.Scale = modifydata.Scale.Value; CurrentScale = Data.Scale; } if (modifydata.SpritePriority != null) { Data.SpritePriority = modifydata.SpritePriority.Value; DrawOrder = Data.SpritePriority; } if (modifydata.DrawOnTop != null) { Data.DrawOnTop = modifydata.DrawOnTop.Value; if (Data.DrawOnTop == true) DrawOrder = 11; } if (modifydata.RemoveOnGetHit != null) { Data.RemoveOnGetHit = modifydata.RemoveOnGetHit.Value; } if (modifydata.SuperMove != null) { Data.SuperMove = modifydata.SuperMove.Value; } if (modifydata.SuperMoveTime != null) { Data.SuperMoveTime = modifydata.SuperMoveTime.Value; } if (modifydata.PauseTime != null) { Data.PauseTime = modifydata.PauseTime.Value; } if (modifydata.RemoveTime != null) { Data.RemoveTime = modifydata.RemoveTime.Value; } if (modifydata.BindTime != null) { Data.BindTime = modifydata.BindTime.Value; } if (modifydata.Acceleration != null) { Data.Acceleration = modifydata.Acceleration.Value; CurrentAcceleration = Data.Acceleration; } if (modifydata.Velocity != null) { Data.Velocity = modifydata.Velocity.Value; CurrentVelocity = Data.Velocity; } if (modifydata.IgnoreHitPause != null) { Data.IgnoreHitPause = modifydata.IgnoreHitPause.Value; } if (modifydata.Flip != null) { Data.Flip = modifydata.Flip.Value; } if (modifydata.PositionType != null) { Data.PositionType = modifydata.PositionType.Value; } if (modifydata.Location != null) { Data.Location = modifydata.Location.Value; } if (modifydata.Random != null) { Data.Random = modifydata.Random.Value; } if (modifydata.Transparency != null) { Data.Transparency = modifydata.Transparency.Value; Transparency = Data.Transparency; } if (modifydata.PositionType != null || modifydata.Location != null) { CurrentLocation = GetStartLocation(); } if (modifydata.Flip != null) { CurrentFacing = GetStartFacing(); } /* Data.CommonAnimation = data.CommonAnimation; Data.AnimationNumber = data.AnimationNumber; */ }