TapTitanXNA_JonryBorbe.Button.hitImage C# (CSharp) Méthode

hitImage() public méthode

public hitImage ( float tx, float ty, Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y ) : bool
tx float
ty float
texture Microsoft.Xna.Framework.Graphics.Texture2D
x int
y int
Résultat bool
        public bool hitImage(float tx, float ty, Texture2D texture, int x, int y)
        {
            return (x >= tx && x <= tx + texture.Width && y >= ty && y <= ty + texture.Height);
        }