|  | Adventure Creator 1.84.3
    An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024 | 
 
  
| Public Member Functions | |
| CursorIconBase () | |
| void | Copy (CursorIconBase _icon) | 
| Copies the values from another CursorIconBase. | |
| void | DrawAsInteraction (Rect _rect, bool isActive) | 
| Draws the graphic as part of a Menu, for when it's displayed within a MenuGraphic or MenuInteraction. | |
| UnityEngine.Sprite | GetSprite () | 
| Gets a Sprite based on the texture supplied. The Sprite will be generated on the fly if it does not already exist. | |
| UnityEngine.Sprite | GetAnimatedSprite (int _frameIndex) | 
| Gets a Sprite based on the animated texture supplied. The Sprite will be generated on the fly if it does not already exist. | |
| UnityEngine.Sprite | GetAnimatedSprite (bool isActive) | 
| Gets a Sprite based on the animated texture supplied, when the texture is used within a MenuElement (MenuGraphic or MenuInteraction). The Sprite will be generated on the fly if it does not already exist. | |
| void | ReplaceTexture (Texture newTexture) | 
| Replaces the icon's texture, and also clears internal caches. | |
| void | ClearSprites () | 
| Texture2D | GetAnimatedTexture (bool canAnimate=true) | 
| Gets a slice of the texture that represents the current frame, if the texture consists of animated frames. | |
| string | GetName () | 
| Gets a unique identifier, based on the texture and current animation frame. | |
| virtual void | ClearCache () | 
| Texture | Draw (Vector2 centre, bool canAnimate=true) | 
| Draws the texture as a cursor icon. | |
| Rect | GetAnimatedRect () | 
| Gets a Rect that describes a slice of the animated texture that represents the current frame. | |
| Rect | GetAnimatedRect (int _frameIndex) | 
| Gets a Rect that describes a slice of the animated texture that represents a specific frame. | |
| void | Reset (bool resetFrameIndex=true) | 
| void | ShowGUI (bool includeSize, bool includeAlwaysAnimate=true, string _label="Texture:", CursorRendering cursorRendering=CursorRendering.Software, string apiPrefix="", string tooltip="") | 
| Static Public Member Functions | |
| static bool | IsValid (CursorIconBase cursorIcon) | 
| Public Attributes | |
| Texture | texture | 
| bool | isAnimated = false | 
| int | numFrames = 1 | 
| int | numRows = 1 | 
| int | numCols = 1 | 
| float | size = 0.015f | 
| float | animSpeed = 4f | 
| bool | endAnimOnLastFrame = false | 
| bool | skipFirstFrameWhenLooping = false | 
| Vector2 | clickOffset | 
| float[] | frameSpeeds | 
| bool | alwaysAnimate = false | 
A data container for all cursor icons, as well as animated textures used by MenuGraphic.
| AC.CursorIconBase.CursorIconBase | ( | ) | 
The default Constructor.
| 
 | virtual | 
Clears the animated Texture2D and Sprite caches.
Reimplemented in AC.CursorIcon.
| void AC.CursorIconBase.ClearSprites | ( | ) | 
Clears the generated sprite.
| void AC.CursorIconBase.Copy | ( | CursorIconBase | _icon | ) | 
Copies the values from another CursorIconBase.
| _icon | The CursorIconBase to copy from | 
| Texture AC.CursorIconBase.Draw | ( | Vector2 | centre, | 
| bool | canAnimate = true ) | 
Draws the texture as a cursor icon.
| centre | The cursor's centre position on-screen | 
| canAnimate | If True, and isAnimated = True, the texture can be animated. If False, the texture will never animate | 
| void AC.CursorIconBase.DrawAsInteraction | ( | Rect | _rect, | 
| bool | isActive ) | 
Draws the graphic as part of a Menu, for when it's displayed within a MenuGraphic or MenuInteraction.
| _rect | The dimensions to draw the graphic | 
| isActive | If True, then the associated MenuElement is active (e.g. the mouse is hovering over it) | 
| Rect AC.CursorIconBase.GetAnimatedRect | ( | ) | 
Gets a Rect that describes a slice of the animated texture that represents the current frame.
| Rect AC.CursorIconBase.GetAnimatedRect | ( | int | _frameIndex | ) | 
Gets a Rect that describes a slice of the animated texture that represents a specific frame.
| _frameIndex | The frame in question | 
| UnityEngine.Sprite AC.CursorIconBase.GetAnimatedSprite | ( | bool | isActive | ) | 
Gets a Sprite based on the animated texture supplied, when the texture is used within a MenuElement (MenuGraphic or MenuInteraction). The Sprite will be generated on the fly if it does not already exist.
| isActive | If True, then the associated MenuElement is active (e.g. the mouse is hovering over it) | 
| UnityEngine.Sprite AC.CursorIconBase.GetAnimatedSprite | ( | int | _frameIndex | ) | 
Gets a Sprite based on the animated texture supplied. The Sprite will be generated on the fly if it does not already exist.
| _frameIndex | The texture frame to convert | 
| Texture2D AC.CursorIconBase.GetAnimatedTexture | ( | bool | canAnimate = true | ) | 
Gets a slice of the texture that represents the current frame, if the texture consists of animated frames.
| string AC.CursorIconBase.GetName | ( | ) | 
Gets a unique identifier, based on the texture and current animation frame.
| UnityEngine.Sprite AC.CursorIconBase.GetSprite | ( | ) | 
Gets a Sprite based on the texture supplied. The Sprite will be generated on the fly if it does not already exist.
| 
 | static | 
Checks if a given class instance is valid, i.e. is non-null and has a texture
| void AC.CursorIconBase.ReplaceTexture | ( | Texture | newTexture | ) | 
Replaces the icon's texture, and also clears internal caches.
| newTexture | The icon's new texture | 
| void AC.CursorIconBase.Reset | ( | bool | resetFrameIndex = true | ) | 
Resets the animation, if the texture is animated.
| bool AC.CursorIconBase.alwaysAnimate = false | 
If True, and isAnimated = True, then the animation will occur always and not just when made active
| float AC.CursorIconBase.animSpeed = 4f | 
The animation playback speed, if animated
| Vector2 AC.CursorIconBase.clickOffset | 
The offset of the "click point", when used as a cursor
| bool AC.CursorIconBase.endAnimOnLastFrame = false | 
If True, then animations will end on the final frame, rather than looping
| float [] AC.CursorIconBase.frameSpeeds | 
An array of the speeds for each frame when animating, where the index of the array corresponds to the frame of the animation
| bool AC.CursorIconBase.isAnimated = false | 
If True, then the texture will be considered to consist of multiple animation frames, and they will be displayed sequentially
| int AC.CursorIconBase.numCols = 1 | 
The number of columns in the texture, if animated
| int AC.CursorIconBase.numFrames = 1 | 
The number of frames in the texture, if animated
| int AC.CursorIconBase.numRows = 1 | 
The number of rows in the texture, if animated
| float AC.CursorIconBase.size = 0.015f | 
The size of the icon
| bool AC.CursorIconBase.skipFirstFrameWhenLooping = false | 
If True, and isAnimated = True, then the first frame will be skipped when in a looping animation
| Texture AC.CursorIconBase.texture | 
The texture to use