Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TypeIsInstruction.cs
Go to the documentation of this file.
2
3internal sealed class TypeIsInstruction : Instruction
4{
5 private readonly Type _type;
6
7 public override int ConsumedStack => 1;
8
9 public override int ProducedStack => 1;
10
11 public override string InstructionName => "TypeIs";
12
14 {
15 _type = type;
16 }
17
18 public override int Run(InterpretedFrame frame)
19 {
20 frame.Push(_type.IsInstanceOfType(frame.Pop()));
21 return 1;
22 }
23
24 public override string ToString()
25 {
26 return "TypeIs " + _type.ToString();
27 }
28}
virtual bool IsInstanceOfType([NotNullWhen(true)] object? o)
Definition Type.cs:1020
override string ToString()
Definition Type.cs:1108