MethodInstruction
Introduction
Using Method Instructions
using FlatRedBall.Instructions;
using FlatRedBall.Input;if (InputManager.Keyboard.KeyPushed(Keys.Space))
{
for (int i = 0; i < 8; i++)
{
// This code uses "CreateExplosionSprite" which is the name of the
// method to call.
InstructionManager.Instructions.Add(
new MethodInstruction<Game1>(
this, // Instance to Game1
"CreateExplosionSprite", // Method to call
new object[0], // Argument List
TimeManager.CurrentTime + i / 25.0f)); // When to call
}
}
"arguments" argument
Using MethodInfo
Last updated
Was this helpful?