Compare commits
3 Commits
88cd1e3a73
...
5f20d0e906
Author | SHA1 | Date |
---|---|---|
Jill | 5f20d0e906 | |
Jill | 451097adb6 | |
Jill | fd1a0b0427 |
29
MANUAL.md
29
MANUAL.md
|
@ -24,6 +24,7 @@ Uranium Template originally formed during the creation of a currently unreleased
|
||||||
- [How do I start writing code?](#how-do-i-start-writing-code)
|
- [How do I start writing code?](#how-do-i-start-writing-code)
|
||||||
- [Defining actors](#defining-actors)
|
- [Defining actors](#defining-actors)
|
||||||
- [Initializing actors](#initializing-actors)
|
- [Initializing actors](#initializing-actors)
|
||||||
|
- [Accessing raw actors](#accessing-raw-actors)
|
||||||
- [Actor-specific notes](#actor-specific-notes)
|
- [Actor-specific notes](#actor-specific-notes)
|
||||||
- [`ActorFrameTexture`](#actorframetexture)
|
- [`ActorFrameTexture`](#actorframetexture)
|
||||||
- [`ActorFrame`](#actorframe)
|
- [`ActorFrame`](#actorframe)
|
||||||
|
@ -120,6 +121,7 @@ Uranium Template originally formed during the creation of a currently unreleased
|
||||||
- [`rng:jump(): void`](#rngjump-void)
|
- [`rng:jump(): void`](#rngjump-void)
|
||||||
- [`rng:longJump(): void`](#rnglongjump-void)
|
- [`rng:longJump(): void`](#rnglongjump-void)
|
||||||
- [`ease`](#ease)
|
- [`ease`](#ease)
|
||||||
|
- [`profiler`](#profiler)
|
||||||
- [`util`](#util)
|
- [`util`](#util)
|
||||||
- [`aft`](#aft)
|
- [`aft`](#aft)
|
||||||
- [`noautplay`](#noautplay)
|
- [`noautplay`](#noautplay)
|
||||||
|
@ -231,6 +233,27 @@ sprite:addcommand('Init', function(self)
|
||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Accessing raw actors
|
||||||
|
|
||||||
|
As you may have noticed, when you print an actor defined with Uranium, it won't show up as an actor - it'll show up as a "proxy" of an actor. This is because we can't actually get actors created on demand in NotITG - what happens instead is you get an object that _acts_ like an actor by calling all the same methods you pass into it, but isn't really one.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
local q = Quad()
|
||||||
|
print(q) --> 'Proxy of Quad'
|
||||||
|
```
|
||||||
|
|
||||||
|
Typically, this doesn't matter; however, in certain contexts, it may be required for you to get the raw actor from a proxy actor. You can do this by accessing `__raw` on the actor - this is defined on all actors and is only available _post-initialization_.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
local q = Quad()
|
||||||
|
print(q.__raw) --> nil
|
||||||
|
q:addcommand('Init', function()
|
||||||
|
print(q.__raw) --> 'Sprite (168F7F78)'
|
||||||
|
end)
|
||||||
|
```
|
||||||
|
|
||||||
|
For most things that require this, there exist simple abstractions - applying shaders has `setShader`, `setShaderfuck`, etc., however in rare circumstances this may be useful. _Please let me know if there's a use-case that I haven't accounted for!_
|
||||||
|
|
||||||
### Actor-specific notes
|
### Actor-specific notes
|
||||||
|
|
||||||
#### `ActorFrameTexture`
|
#### `ActorFrameTexture`
|
||||||
|
@ -986,6 +1009,12 @@ _Exports globals_
|
||||||
|
|
||||||
A direct copy of [Mirin Template's `ease.lua`](https://github.com/XeroOl/notitg-mirin/blob/master/template/ease.lua), for convinience. See the docs for those [**here**](https://xerool.github.io/notitg-mirin/docs/eases.html).
|
A direct copy of [Mirin Template's `ease.lua`](https://github.com/XeroOl/notitg-mirin/blob/master/template/ease.lua), for convinience. See the docs for those [**here**](https://xerool.github.io/notitg-mirin/docs/eases.html).
|
||||||
|
|
||||||
|
### `profiler`
|
||||||
|
|
||||||
|
_Defines callbacks_
|
||||||
|
|
||||||
|
A simple profiler for Uranium Template's callback system. Require it and it'll display in the left-top corner of your screen, showing what callback functions are taking the longest to run.
|
||||||
|
|
||||||
### `util`
|
### `util`
|
||||||
|
|
||||||
_Exports globals_
|
_Exports globals_
|
||||||
|
|
2
template
2
template
|
@ -1 +1 @@
|
||||||
Subproject commit 4e8ba205621df4df01643dc6eea181656fc23bf8
|
Subproject commit 8262b62e4c991658661581d9b52b7ebb3b3f585f
|
Loading…
Reference in New Issue