-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomPlantEventNotification.as
83 lines (52 loc) · 1.45 KB
/
CustomPlantEventNotification.as
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
72
73
74
75
76
77
78
79
80
81
82
83
package
{
import flash.display.MovieClip;
//-----------------------
//Purpose: Notify the player that the current day has a custom plant event
//
//Properties:
//
//Methods:
//
//-----------------------
public class CustomPlantEventNotification extends Notification
{
// Constants //
//- Constants -//
// Public Properties //
public override function get type():int
{
return Notification.TYPE_CALENDAR;
}
//- Public Properties -//
// Private Properties //
private var _plantType:int;
private var _quantity:int;
//- Private Properties -//
// Initialization //
public function CustomPlantEventNotification(uiManager:UIManager, displaySeconds:int, plantType:int, quantity:int)
{
super(uiManager, displaySeconds);
_plantType = plantType;
_quantity = quantity;
Paint();
}
//- Initialization -//
// Public Methods //
public override function Paint():MovieClip
{
var mcNotification:Notification_CustomPlantEvent_MC = new Notification_CustomPlantEvent_MC();
var sMessage:String = "Plant " + _quantity + "\n" + Plant.NAME[_plantType];
mcNotification.Message.text = sMessage;
_graphics = mcNotification;
return mcNotification;
}
//- Public Methods -//
// Protected Methods //
//- Protected Methods -//
// Private Methods //
//- Private Methods -//
// Testing Methods //
//- Testing Methods -//
}
}