Example #1
0
    //-------------------------------------------------------------------------
    public void setPosition(EbVector3 pos)
    {
        EbVector3 pixel_pos = CCoordinate.logic2toolkitPos(pos);
        Vector3   cur_pos;

        cur_pos.x           = pixel_pos.x;
        cur_pos.y           = pixel_pos.y;
        cur_pos.z           = mTransform.position.z;
        mTransform.position = cur_pos;
    }
Example #2
0
    //-------------------------------------------------------------------------
    public void setPosition(EbVector3 pos)
    {
        EbVector3 pixel_pos = CCoordinate.logic2toolkitPos(pos);

        pixel_pos += CLogicUtility.getVector2ByRotateAngle(mOffsetLocation, mDirection);

        Vector3 cur_pos;

        cur_pos.x           = pixel_pos.x;
        cur_pos.y           = pixel_pos.y;
        cur_pos.z           = mTransform.position.z;
        mTransform.position = cur_pos;
    }
Example #3
0
    //-------------------------------------------------------------------------
    Vector2 pixel2logicPos(Vector2 origin)
    {
        EbVector3 vv = CCoordinate.pixel2logicPos(new EbVector3(origin.x, origin.y, 0));

        return(new Vector2(vv.x, vv.y));
    }