Ejemplo n.º 1
0
    //-------------------------------------------------------------------------------------------------------
    protected void onAnimationPlaying(INGUIAnimation window, bool isBreak)
    {
        // 由于原坐标系是以图片左上角为原点,unity是以图片中心为原点,所以需要根据图片大小再做父节点偏移
        Vector2 parentPos = new Vector2(mEffectNode.getWindowSize().x / 2.0f, -mEffectNode.getWindowSize().y / 2.0f);

        LT.MOVE_WINDOW(mParentNode, parentPos);
    }
Ejemplo n.º 2
0
    //-------------------------------------------------------------------------------------------------------
    protected void onAnimationPlaying(INGUIAnimation window, bool isBreak)
    {
        mWeapon.setCurFrameIndex(mCloth.getCurFrameIndex());
        // 由于原坐标系是以图片左上角为原点,unity是以图片中心为原点,所以需要根据图片大小再做父节点偏移
        Vector2 clothParentPos = new Vector2(mCloth.getWindowSize().x / 2.0f, -mCloth.getWindowSize().y / 2.0f);

        LT.MOVE_WINDOW(mClothParent, clothParentPos);
        Vector2 weaponParentPos = new Vector2(mWeapon.getWindowSize().x / 2.0f, -mWeapon.getWindowSize().y / 2.0f);

        LT.MOVE_WINDOW(mWeaponParent, weaponParentPos);
    }