1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
Matej Jan 093802dbc4 Finished touch panel state.
git-svn-id: http://xni.googlecode.com/svn/XNI@34 ac433895-eea3-a490-d80a-17149a75e588
2010-10-01 02:36:21 +00:00

49 lines
885 B
Objective-C

//
// TouchLocation.m
// XNI
//
// Created by Matej Jan on 29.9.10.
// Copyright 2010 Retronator. All rights reserved.
//
#import "TouchLocation.h"
@implementation TouchLocation
- (id) initWithIdentifier:(int)theIdentifier position:(Vector2*)thePosition
previousPosition:(Vector2*)thePreviousPosition state:(TouchLocationState)theState;
{
self = [super init];
if (self != nil) {
identifier = theIdentifier;
position = [thePosition retain];
previousPosition = [thePreviousPosition retain];
state = theState;
}
return self;
}
@synthesize identifier;
@synthesize position;
@synthesize state;
- (BOOL) tryGetPreviousPosition:(Vector2**)thePeviousPosition {
if (previousPosition) {
*thePeviousPosition = previousPosition;
return YES;
} else {
return NO;
}
}
- (void) dealloc
{
[position release];
[previousPosition release];
[super dealloc];
}
@end