Exemple #1
0
 public static void MovingPriority([NotNull] EventHandler <PlayerMovingEventArgs> callback, Priority priority)
 {
     if (callback == null)
     {
         throw new ArgumentNullException("callback");
     }
     MovingEvent.Add(callback, priority);
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < NUM; ++i)
        {
            objs[i]     = new MyObject();
            objs[i].obj = Instantiate(Resources.Load("Prefabs/boxes"), new Vector3(0, 0.001f * i, 0), Quaternion.Euler(90, 45, 0)) as GameObject;
        }

        //eventList.Add (new RotationEvent(this));
        //eventList.Add (new ScaleEvent(this));
        eventList.Add(new MovingEvent(this));
        //eventList.Add (new RotationEvent (this));

        MovingEvent me = new MovingEvent(this);

        me.setDirection(new Vector3(-0.5f, -0.5f, 0));
        me.setDistance(0.32f * 2);
        eventList.Add(me);
    }
 protected void InvokeMovingEvent(string message)
 {
     MovingEvent?.Invoke(message);
 }