Script.cs 728 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using OpenSim.Framework.Console;
  5. using OpenSim.Framework;
  6. using OpenSim.Region;
  7. using OpenSim.Region.Scenes;
  8. namespace OpenSim.Scripting
  9. {
  10. public interface IScript
  11. {
  12. void Initialise(ScriptInfo scriptInfo);
  13. }
  14. public class TestScript : IScript
  15. {
  16. ScriptInfo script;
  17. public void Initialise(ScriptInfo scriptInfo)
  18. {
  19. script = scriptInfo;
  20. script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame);
  21. }
  22. void events_OnFrame()
  23. {
  24. script.logger.Verbose("Hello World!");
  25. }
  26. }
  27. }