-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlgizMenuAnimation.m
69 lines (56 loc) · 1.56 KB
/
AlgizMenuAnimation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// AlgizMenuAnimation.m
// TEORWorldMapTest
//
// Created by Zach Babb on 7/7/11.
// Copyright 2011 InstantLazer. All rights reserved.
//
#import "AlgizMenuAnimation.h"
#import "GameController.h"
#import "AbstractScene.h"
#import "Image.h"
@implementation AlgizMenuAnimation
- (void)dealloc {
[super dealloc];
}
- (id)init {
if (self = [super init]) {
[self moveFromPoint:CGPointMake(260, 270) toPoint:CGPointMake(310, 230)];
essenceColor = Color4fMake(0, 1, 0, 1);
runeText = @"Algiz calls upon the power of the squirrel. It will make your enemies' essence refill slower and will cure an ally who has fatigued or drauraed. Used on the party, it will summon the squirrel.";
rune = [[Image alloc] initWithImageNamed:@"Rune209.png" filter:GL_LINEAR];
}
return self;
}
- (void)updateWithDelta:(float)aDelta {
[super updateWithDelta:aDelta];
if (duration < 0) {
switch (stage) {
case 0:
stage++;
[self moveFromPoint:CGPointMake(360, 270) toPoint:CGPointMake(210, 230)];
break;
case 1:
stage++;
[self moveFromPoint:CGPointMake(310, 270) toPoint:CGPointMake(310, 70)];
break;
case 2:
stage++;
velocity = Vector2fMake(0, 0);
duration = 2;
break;
case 3:
[[GameController sharedGameController].currentScene removeDrawingImages];
stage = 0;
[self moveFromPoint:CGPointMake(260, 270) toPoint:CGPointMake(310, 230)];
break;
default:
break;
}
}
}
- (void)resetAnimation {
[self moveFromPoint:CGPointMake(260, 270) toPoint:CGPointMake(310, 230)];
stage = 0;
}
@end