Class InteractableGrabScaleTheme
ThemeEngine to control initialized GameObject's scale based on associated Interactable grab state and related state changes
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public class InteractableGrabScaleTheme : InteractableThemeBase
Constructors
InteractableGrabScaleTheme()
Declaration
public InteractableGrabScaleTheme()
Fields
grabPercentage
Declaration
protected float grabPercentage
Field Value
Type | Description |
---|---|
Single |
grabTransition
Declaration
protected bool grabTransition
Field Value
Type | Description |
---|---|
Boolean |
hasGrab
Declaration
protected bool hasGrab
Field Value
Type | Description |
---|---|
Boolean |
startScaleValue
Declaration
protected ThemePropertyValue startScaleValue
Field Value
Type | Description |
---|---|
ThemePropertyValue |
targetInteractable
Declaration
protected Interactable targetInteractable
Field Value
Type | Description |
---|---|
Interactable |
timer
Declaration
protected float timer
Field Value
Type | Description |
---|---|
Single |
Methods
GetDefaultThemeDefinition()
Generates the default theme definition configuration for the current theme implementation
Declaration
public override ThemeDefinition GetDefaultThemeDefinition()
Returns
Type | Description |
---|---|
ThemeDefinition | Default ThemeDefinition to initialize with the current theme engine implemenetation |
Overrides
GetProperty(ThemeStateProperty)
Get the current property value for the provided state property
Declaration
public override ThemePropertyValue GetProperty(ThemeStateProperty property)
Parameters
Type | Name | Description |
---|---|---|
ThemeStateProperty | property | state property to access |
Returns
Type | Description |
---|---|
ThemePropertyValue | Value currently for given state property |
Overrides
Init(GameObject, ThemeDefinition)
Initialize current Theme Engine with given configuration and target the provided GameObject
Declaration
public override void Init(GameObject host, ThemeDefinition settings)
Parameters
Type | Name | Description |
---|---|---|
GameObject | host | GameObject to target changes against |
ThemeDefinition | settings |
Overrides
OnUpdate(Int32, Boolean)
Update ThemeEngine for given state based on Theme logic. Check, sets, and possibly eases values based on given state
Declaration
public override void OnUpdate(int state, bool force = false)
Parameters
Type | Name | Description |
---|---|---|
Int32 | state | current state to target |
Boolean | force | force update call even if state is not new |
Overrides
SetValue(ThemeStateProperty, Int32, Single)
Instruct theme to set value for current property with given index state and at given lerp percentage
Declaration
public override void SetValue(ThemeStateProperty property, int index, float percentage)
Parameters
Type | Name | Description |
---|---|---|
ThemeStateProperty | property | property to update value |
Int32 | index | index of state to access array of values |
Single | percentage | percentage transition between values |