Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
BranchTrueInstruction.cs
Go to the documentation of this file.
2
4{
5 private static Instruction[] s_cache;
6
7 public override Instruction[] Cache
8 {
9 get
10 {
11 if (s_cache == null)
12 {
13 s_cache = new Instruction[32];
14 }
15 return s_cache;
16 }
17 }
18
19 public override string InstructionName => "BranchTrue";
20
21 public override int ConsumedStack => 1;
22
23 public override int Run(InterpretedFrame frame)
24 {
25 if ((bool)frame.Pop())
26 {
27 return _offset;
28 }
29 return 1;
30 }
31}