-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSpriteBar.h
31 lines (25 loc) · 924 Bytes
/
SpriteBar.h
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
//
// SpriteBar.h
// SpriteBar
//
// Created by Henry Everett on 27/05/2014.
// Copyright (c) 2014 Henry Everett. All rights reserved.
//
#import <SpriteKit/SpriteKit.h>
@interface SpriteBar : SKSpriteNode
@property (nonatomic, strong) NSString *textureReference;
/* Initialise with default progress bar graphics. */
- (id)init;
/* Initialise with custom progress bar graphics. */
- (id)initWithTextureAtlas:(SKTextureAtlas *)textureAtlas;
/* Start incrementing progress bar using timer. */
- (void)startBarProgressWithTimer:(NSTimeInterval)seconds target:(id)target selector:(SEL)selector;
/* Invalidate the timer. */
- (void)invalidateTimer;
/* Set progress and calculate as a percentage of total number. */
- (void)setProgressWithValue:(CGFloat)progress ofTotal:(CGFloat)maxValue;
/* Set progress manually. */
- (void)setProgress:(CGFloat)progress;
/* Reset progress bar to zero. */
- (void)resetProgress;
@end