Forum > C# > property "textRect" in class CCSprite do not work in XNA version as in IOS version

property "textRect" in class CCSprite do not work in XNA version as in IOS version

By superm Posted 2012-06-09 05:25 Comments 1
superm
  • Posts: 1

in the xna version sources:

@ private CCRect m_obTextureRect;
/// <summary>
/// returns the rect of the CCSprite in points
/// </summary>
public CCRect textureRect
{
// read only
get { return m_obTextureRect; }
}

@
in “CCSprite.cs”,there are few lines anbout property “textRect” in class CCSprite,any ideas?

jwa@javatopia.com
  • Posts: 243
  • Location: Totally Evil Entertainment - San Diego

#1 RE: 2012-07-05 18:06

hello. This method in the XNA code is not used anywhere. the texture rectangle is updated in the setTextureRect methods (there are 2). I did a quick check in the cocos2d-x and cocos2d-xna code bases and they are both handling the texture bounds in the same fashion.

Loggin to reply

Copyright © 2010 - 2013 Cocos2d-x.orgClustrmaps