1
using System
.Collections
;
2 using System
.Collections
.Generic
;
6 public class BossSceneStarter
: MonoBehaviour
{
8 private Transform yarn
;
9 private BossMovement boss
;
10 private BossController bossController
;
11 private GameObject gridOpen
;
12 private GameObject gridClosed
;
14 private GameObject m_HealthSlider
;
16 private GameObject m_HealthSliderText
;
21 // Use this for initialization
23 yarn
= GameObject
.FindGameObjectWithTag ("YarnPhysics").GetComponent
<Transform
>();
24 boss
= GameObject
.FindGameObjectWithTag ("TanukiSensei").GetComponent
<BossMovement
>();
25 bossController
= GameObject
.FindGameObjectWithTag ("TanukiSensei").GetComponent
<BossController
>();
26 gridOpen
= GameObject
.FindGameObjectWithTag ("BossGridOpen");
27 gridClosed
= GameObject
.FindGameObjectWithTag ("BossGridClosed");
28 gridClosed
.SetActive (false);
29 m_HealthSlider
.SetActive (false);
30 m_HealthSliderText
.SetActive (false);
36 // Update is called once per frame
39 if (yarn
.position
.x
> -30f
&& once
)
41 gridClosed
.SetActive (true);
42 gridOpen
.SetActive (false);
43 m_HealthSlider
.SetActive (true);
44 m_HealthSliderText
.SetActive (true);
48 if (yarn
.position
.x
> -19.7) {
49 boss
.hoverPath
= true;
50 bossController
.automated
= true;