-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAustrinMenuAnimation.m
68 lines (56 loc) · 1.57 KB
/
AustrinMenuAnimation.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
//
// AustrinMenuAnimation.m
// TEORWorldMapTest
//
// Created by Zach Babb on 6/23/11.
// Copyright 2011 InstantLazer. All rights reserved.
//
#import "AustrinMenuAnimation.h"
#import "GameController.h"
#import "AbstractScene.h"
#import "Image.h"
@implementation AustrinMenuAnimation
- (void)dealloc {
[super dealloc];
}
- (id)init {
if (self = [super init]) {
[self moveFromPoint:CGPointMake(360, 270) toPoint:CGPointMake(260, 270)];
essenceColor = Color4fMake(0, 1, 0, 1);
runeText = @"The Eastern wind brings storm clouds and rain. It prevents an enemy from healing itself, and will lower all enemies' love of the sky. Meanwhile it makes your allies' runes more powerful or heals some of their essence.";
rune = [[Image alloc] initWithImageNamed:@"Rune39.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, 170) toPoint:CGPointMake(260, 170)];
break;
case 1:
stage++;
[self moveFromPoint:CGPointMake(360, 70) toPoint:CGPointMake(260, 70)];
break;
case 2:
stage++;
velocity = Vector2fMake(0, 0);
duration = 2;
break;
case 3:
[[GameController sharedGameController].currentScene removeDrawingImages];
stage = 0;
[self moveFromPoint:CGPointMake(360, 270) toPoint:CGPointMake(260, 270)];
break;
default:
break;
}
}
}
- (void)resetAnimation {
[self moveFromPoint:CGPointMake(360, 270) toPoint:CGPointMake(260, 270)];
stage = 0;
}
@end