-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnsuzMenuAnimation.m
More file actions
71 lines (57 loc) · 1.5 KB
/
AnsuzMenuAnimation.m
File metadata and controls
71 lines (57 loc) · 1.5 KB
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
70
71
//
// AnsuzMenuAnimation.m
// TEORWorldMapTest
//
// Created by Zach Babb on 6/4/11.
// Copyright 2011 InstantLazer. All rights reserved.
//
#import "AnsuzMenuAnimation.h"
#import "GameController.h"
#import "AbstractScene.h"
#import "Global.h"
#import "Image.h"
@implementation AnsuzMenuAnimation
- (void)dealloc {
[super dealloc];
}
- (id)init {
if (self = [super init]) {
[self moveFromPoint:CGPointMake(290, 270) toPoint:CGPointMake(290, 70)];
essenceColor = Color4fMake(0, 0, 1, 1);
runeText = @"Ansuz is a rune of command. Using it on enemies, Roderick leads the charge against them. While your allies will feel encouraged by it.";
rune = [[Image alloc] initWithImageNamed:@"Rune201.png" filter:GL_LINEAR];
}
return self;
}
- (void)updateWithDelta:(float)aDelta {
[super updateWithDelta:aDelta];
if (duration < 0) {
switch (stage) {
case 0:
stage++;
[self moveFromPoint:CGPointMake(290, 270) toPoint:CGPointMake(360, 220)];
break;
case 1:
stage++;
[self moveFromPoint:CGPointMake(290, 200) toPoint:CGPointMake(360, 150)];
break;
case 2:
stage++;
velocity = Vector2fMake(0, 0);
duration = 2;
break;
case 3:
[[GameController sharedGameController].currentScene removeDrawingImages];
stage = 0;
[self moveFromPoint:CGPointMake(290, 270) toPoint:CGPointMake(290, 70)];
break;
default:
break;
}
}
}
- (void)resetAnimation {
[self moveFromPoint:CGPointMake(290, 270) toPoint:CGPointMake(290, 70)];
stage = 0;
}
@end