Ejemplo n.º 1
0
    void OnRemoveEntityFromThread(Notify.Notification note)
    {
        print("OnRemoveEntityFromThread");
        string id = note.Params[0] as string;

        QueueRemoveBoxEntity.Enqueue(id);
    }
Ejemplo n.º 2
0
    void OnCreateBulletEntityFromThread(Notify.Notification note)
    {
        Entity entity = note.Params[0] as Entity;

        entity.AddComponent(new MoveComponent(5, new float2(0, 1))).AddComponent(new TransformComponent(float2.zero));
        QueueBulletEntity.Enqueue(entity.Id.ToString());
    }
Ejemplo n.º 3
0
    void OnCreateEntityFromThread(Notify.Notification note)
    {
        Entity entity = note.Params[0] as Entity;

        entity.AddComponent(new MoveComponent(15, float2.zero)).
        AddComponent(new TransformComponent(float2.zero)).
        AddComponent(new PlayerInfoComponent()).
        AddComponent(new SphereColliderComponent(VInt3.zero, 20));
        QueueCreateEntity.Enqueue(entity.Id.ToString());
    }
Ejemplo n.º 4
0
    void OnCreateBoxEntityFromThread(Notify.Notification note)
    {
        Entity       entity       = note.Params[0] as Entity;
        FrameIdxInfo frameIdxInfo = note.Params[1] as FrameIdxInfo;

        entity.AddComponent(new TransformComponent(float2.zero)).
        AddComponent(new MoveComponent(int.Parse(frameIdxInfo.Params[1]), new float2(int.Parse(frameIdxInfo.Params[2]), int.Parse(frameIdxInfo.Params[3])))).
        AddComponent(new BoxColliderComponent(VInt3.zero, new VInt3(50, 50, 0))).
        AddComponent(new IntValueComponent(1)).
        AddComponent(new FrameClockComponent(100, 1));
        QueueCreateBoxEntity.Enqueue(entity.Id.ToString());
    }
Ejemplo n.º 5
0
 void OnReadyPlayerAndAdd(Notify.Notification note)
 {
     print("Ready RoleId " + note.Params[0]);
 }
Ejemplo n.º 6
0
    void OnRemoveEntityFromThread(Notify.Notification note)
    {
        string id = note.Params[0].ToString();

        QueueRemoveBoxEntity.Enqueue(id);
    }