-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAkathMenuAnimation.m
68 lines (56 loc) · 1.53 KB
/
AkathMenuAnimation.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
//
// AkathMenuAnimation.m
// TEORWorldMapTest
//
// Created by Zach Babb on 6/27/11.
// Copyright 2011 InstantLazer. All rights reserved.
//
#import "AkathMenuAnimation.h"
#import "GameController.h"
#import "AbstractScene.h"
#import "Image.h"
@implementation AkathMenuAnimation
- (void)dealloc {
[super dealloc];
}
- (id)init {
if (self = [super init]) {
[self moveFromPoint:CGPointMake(310, 270) toPoint:CGPointMake(310, 70)];
essenceColor = Color4fMake(0, 1, 0, 1);
runeText = @"Akath will shield against powers of life or will cure an ally who is disoriented. When used on enemies it will make any unfortunate ailments they have last longer.";
rune = [[Image alloc] initWithImageNamed:@"Rune217.png" filter:GL_LINEAR];
}
return self;
}
- (void)updateWithDelta:(float)aDelta {
[super updateWithDelta:aDelta];
if (duration < 0) {
switch (stage) {
case 0:
stage++;
[self moveFromPoint:CGPointMake(310, 270) toPoint:CGPointMake(280, 240)];
break;
case 1:
stage++;
[self moveFromPoint:CGPointMake(340, 100) 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(310, 270) toPoint:CGPointMake(310, 70)];
break;
default:
break;
}
}
}
- (void)resetAnimation {
[self moveFromPoint:CGPointMake(310, 270) toPoint:CGPointMake(310, 70)];
stage = 0;
}
@end