Skip to content

Commit fdc3e7f

Browse files
Update README.md
1 parent a5298be commit fdc3e7f

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,25 @@ Caster.RayHit:Connect(OnRayHit)
9595

9696
6. Enjoy, see more [samples](https://github.com/weenachuangkud/FastCast2/tree/main/samples)
9797

98-
# API Usages/Examples
98+
# API Usages
99+
100+
## Constructor
101+
> [!warning]
102+
> Do not create a new caster every time your weapon fires! This is a common mistake people make. Doing this will cause severe performance problems and unexpected behavior in the module.\
103+
> Remember - A caster is like a gun. Creating a caster every time the weapon is fired is like buying a new gun every time you want to fire a bullet.
104+
105+
**FastCast.new()**
106+
Construct a new **Caster** instance, which represents an entire gun or other projectile launching system.
107+
108+
**FastCast.newBehavior()**
109+
Creates a new **FastCastBehavior**, which contains information necessary to fire the cast properly.
110+
111+
## Methods
112+
113+
**FastCast:Init(numWorkers, newParent, newName, ContainerParent, VMContainerName, VMname)**
114+
Initialize the **Caster** instance and then create a copy of **FastCastVMs**, set the Parent to the specified **newParent**, and rename it to specified **newName**
115+
116+
# API Examples
99117

100118
Function are **unsafe**?, use `Caster:SafeCall(f : (...any) -> (...any), ...)`\
101119
**Q:** How do you know that the function is not safe to call?\

0 commit comments

Comments
 (0)