/// <summary> /// Updates the camera of the entity associated with this process. /// </summary> /// <param name="deltaTime">Elapsed time since last frame.</param> public override void Run(float deltaTime) { //if (_entity.IsEnabled == false) return; //if (_shakeIntensity <= 0) // { // _shakeIntensity = 0; // Finish(ProcessResult.Success); //} //else // _shakeIntensity -= deltaTime; _entity.TransformationOffset = new Transformation(MathMethods.Random(-_shakeIntensity, _shakeIntensity), MathMethods.Random(-_shakeIntensity, _shakeIntensity), _entity.TransformationOffset.Z, _entity.TransformationOffset.AngleX, _entity.TransformationOffset.AngleY, _entity.TransformationOffset.AngleZ, _entity.TransformationOffset.ScaleX, _entity.TransformationOffset.ScaleY, _entity.TransformationOffset.ScaleZ); }
public void RandomB(ScriptThread thread) { thread.SetReturnValue(MathMethods.Random(thread.GetIntegerParameter(0), thread.GetIntegerParameter(1))); }
public void RandomA(ScriptThread thread) { thread.SetReturnValue(MathMethods.Random(thread.GetFloatParameter(0), thread.GetFloatParameter(1))); }