-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationStatus.cs
More file actions
executable file
·73 lines (55 loc) · 1.63 KB
/
Copy pathAnimationStatus.cs
File metadata and controls
executable file
·73 lines (55 loc) · 1.63 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
72
73
using UnityEngine;
using System.Collections;
public class AnimationStatus : MonoBehaviour {
public bool buildingStopAnimated;
public GameObject ImageTarget;
public GameObject RestartBtn;
public Light BuildingLight;
public GameObject PhotoBtn;
public AudioClip AnimClip;
public AudioSource Music;
// Use this for initialization
void Start () {
buildingStopAnimated = false;
Music = ImageTarget.GetComponent<AudioSource>();
}
// Update is called once per frame
void Update () {
}
public void AnimationStart()
{
buildingStopAnimated = false;
animation.Play("RW_Construction_Animation");
ImageTarget.GetComponent<LogicControl>().StartAnimation = true;
ImageTarget.GetComponent<LogicControl>().showStatic = true;
NGUITools.SetActive(PhotoBtn, false);
}
void BeforeAnimationStop()
{
buildingStopAnimated = true;
RestartBtn.GetComponent<UIPlayTween>().Play(false);
NGUITools.SetActive(PhotoBtn, true);
RestartBtn.GetComponentInChildren<UILabel>().text = "Restart";
BuildingLight.GetComponent<Animation>().Stop();
//ImageTarget.GetComponent<LogicControl>().StartAnimation = false;// .showStatic = buildingStopAnimated;
}
void AnimationStop()
{
/*
Music.Stop();
Music.clip = ImageTarget.GetComponent<LogicControl>().AmbientClip;
Music.loop = true;
Music.Play();
*/
ImageTarget.GetComponent<LogicControl>().StartAnimation = false;// .showStatic = buildingStopAnimated;
}
void MusicStart()
{
Music.Stop();
Music.clip = AnimClip;
Music.loop = false;
Music.Play();
//Start light shadow
BuildingLight.GetComponent<Animation>().Play("LightAnimation_Building");
}
}