aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Scripting/Script.cs
blob: 0f4af00f6335425373f47214536e570f617a14d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Text;

using OpenSim.Framework.Console;
using OpenSim.Framework;
using OpenSim.Region;
using OpenSim.Region.Scenes;

namespace OpenSim.Scripting
{
    public interface IScript
    {
        void Initialise(ScriptInfo scriptInfo);
    }

    public class TestScript : IScript
    {
        ScriptInfo script;

        public void Initialise(ScriptInfo scriptInfo)
        {
            script = scriptInfo;
            script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame);
        }

        void events_OnFrame()
        {
            script.logger.Verbose("Hello World!");
        }
    }
}