public static ClientComponentSpriteLightSource CreateLightSourceSpot( IClientSceneObject sceneObject, Color color, Size2F size, Size2F?logicalSize = null, Vector2D?spritePivotPoint = null, Vector2D?positionOffset = null) { var result = sceneObject.AddComponent <ClientComponentSpriteLightSource>(); result.Color = color; result.RenderingSize = size; result.LogicalSize = logicalSize ?? size; if (spritePivotPoint.HasValue) { result.SpritePivotPoint = spritePivotPoint.Value; } if (positionOffset.HasValue) { result.PositionOffset = positionOffset.Value; } return(result); }
public static void Setup( IClientSceneObject sceneObject, double duration, DelegateUpdateCallback updateCallback) { sceneObject.AddComponent <ClientComponentGenericAnimationHelper>() .SetupInternal(duration, updateCallback); }
protected override BaseClientComponentLightSource ClientCreateLightSource(IClientSceneObject sceneObject) { var lightSource = base.ClientCreateLightSource(sceneObject); // add light flickering sceneObject.AddComponent <ClientComponentLightSourceEffectFlickering>() .Setup(lightSource, flickeringPercents: 5, flickeringChangePercentsPerSecond: 33); return(lightSource); }
protected override BaseClientComponentLightSource ClientCreateLightSource( IItem item, ICharacter character, IClientSceneObject sceneObject) { var lightSource = base.ClientCreateLightSource(item, character, sceneObject); // add light flickering sceneObject.AddComponent <ClientComponentLightSourceEffectFlickering>() .Setup(lightSource, flickeringPercents: 10, flickeringChangePercentsPerSecond: 70); return(lightSource); }