Exemplo n.º 1
0
    public override void Init()
    {
        base.Init();

        if (!mEntityTemplateDragSurfaceSnap)
        {
            mEntityTemplateDragSurfaceSnap = entityTemplate.GetComponent <DragSurfaceSnap>();
        }
    }
Exemplo n.º 2
0
    void Awake()
    {
        if (!drag)
        {
            drag = GetComponent <DragSurfaceSnap>();
        }

        if (!entity)
        {
            entity = GetComponent <M8.EntityBase>();
        }

        drag.dragEndCallback += OnDragEnd;
    }