Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Observer observer = Observer.GetInstance(@"Data Source=rutwik-c\sqlexpress;Initial Catalog=Student.Data.StudentContext;Integrated Security=True",
                                                     "Student.Data.StudentContext",
                                                     "Studs");

            Console.WriteLine(observer.GetHashCode());

            observer.AddListener(MyMethod);
            Console.WriteLine("Listening..");
            Thread.Sleep(100000);
            Console.WriteLine("Stopped..");
        }
Exemplo n.º 2
0
 void Start() => GameEvents.AddListener(this);
 // Use this for initialization
 void Start()
 {
     observer.AddListener(TestEvent.JUMP, myCube0, myCube0.Jump);
     observer.AddListener(TestEvent.JUMP, myCube1, myCube1.Jump);
 }
 // Use this for initialization
 void Start()
 {
     observer.AddListener(TestEvent.CHANGE_COLOR, this, ChangeColor);
 }