Beispiel #1
0
    public void UpdateEntityHighlight(MObject.MInteractMode interactMode, MObject obj)
    {
        MEntity entity = null;

        if (obj.HitObject(rightControllerPosition))
        {
            obj.Response(out entity, rightControllerPosition, interactMode);
        }
        if (activeEntity.entity != entity)
        {
            UnhighlightEntity(activeEntity.entity);
            HighlightEntity(entity);
        }
        if (entity == null)
        {
            activeEntity = new MEntityPair(null, null);
        }
        else
        {
            activeEntity = new MEntityPair(entity, obj);
        }
    }