// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); player_script = player.GetComponent <Scr_PlayerControl>(); bc = GetComponent <BoxCollider2D>(); ms = GameObject.FindGameObjectWithTag("MasterScript").GetComponent <master_script>(); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); player_script = player.GetComponent <Scr_PlayerControl>(); spawndata = GameObject.FindGameObjectWithTag("Locdata").GetComponent <spawnlocationdata>(); ms = GameObject.FindGameObjectWithTag("MasterScript").GetComponent <master_script>(); continuebt.onClick.AddListener(GoContinue); backtovillagebt.onClick.AddListener(GoJelly); mainmenubt.onClick.AddListener(GoMainMenu); }
// Update is called once per frame void Update() { if (player == null) { player = GameObject.FindGameObjectWithTag("Player"); player_script = player.GetComponent <Scr_PlayerControl>(); } actual_bar.value = player_script.health; actual_gauge.value = player_script.Ability_gauge(); CT_count.text = ms.getCT().ToString(); }
// Use this for initialization void Start() { if (passive_icon1 != null) { passive_icon1.SetActive(false); } player = GameObject.FindGameObjectWithTag("Player"); player_script = player.GetComponent <Scr_PlayerControl>(); actual_bar = health_bar.GetComponent <Slider>(); actual_gauge = gauge_bar.GetComponent <Slider>(); ms = GameObject.FindGameObjectWithTag("MasterScript").GetComponent <master_script>(); dialogue_box.SetActive(false); conversation_indicator.SetActive(false); interIndicator.color = Color.clear; interIndicator.text = "Press S to enter"; }
// Use this for initialization void Start() { flag = 0; if (flag == 0) { script = parent.GetComponent <squash_script>(); if (script != null) { flag = 1; } } if (flag == 0) { script2 = parent.GetComponent <Scr_PlayerControl>(); if (script2 != null) { flag = 2; } } if (flag == 0) { script3 = parent.GetComponent <banana_script>(); if (script3 != null) { flag = 3; } } if (flag == 0) { script4 = parent.GetComponent <pepper_script>(); if (script4 != null) { flag = 4; } } if (flag == 0) { script5 = parent.GetComponent <tomato_script>(); if (script5 != null) { flag = 5; } } ls = transform.localScale; orig_scale = transform.localScale.x; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); player_script = player.GetComponent <Scr_PlayerControl>(); spawndata = GameObject.FindGameObjectWithTag("Locdata").GetComponent <spawnlocationdata>(); ms = GameObject.FindGameObjectWithTag("MasterScript").GetComponent <master_script>(); for (int i = 0; i < levellist.Length; i++) { if (ms.checkpoints[sceneid][i] == 0) { levellist[i].SetActive(false); } else { levellist[i].SetActive(true); } buttonlist[i].onClick.AddListener(GoToLevel); //buttonlist[i].onClick.AddListener(() => GoToLevel(i)); } }