Skip to content

Commit c0308ac

Browse files
author
rdeioris
authored
Update Subclassing_API.md
1 parent a0f1892 commit c0308ac

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/Subclassing_API.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ class Monster(Character):
2929
Properties
3030
----------
3131

32+
Properties can be added to your class as static pyrhon class properties:
33+
34+
```py
35+
import unreal_engine as ue
36+
from unreal_engine.classes import Character, PawnSensingComponent, Pawn, FloatProperty
37+
38+
class Hero(Character):
39+
40+
# you can set it from the editor
41+
UpSpeed = FloatProperty
42+
43+
def ReceiveTick(self, DeltaSeconds: float):
44+
location = self.get_actor_location()
45+
location.z += self.UpSpeed * DeltaSeconds
46+
self.set_actor_location(location)
47+
```
48+
49+
3250
Functions and Events
3351
--------------------
3452

0 commit comments

Comments
 (0)