// Use this for initialization void Start() { mainFood_Setting = GameObject.FindGameObjectWithTag("MainFood_Setting").GetComponent <MainFood_Setting>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Ctrl_PC>(); damegeTextManager = GameObject.FindGameObjectWithTag("DamageText").GetComponent <DamageTextManager>(); }
//void Awake() void Awake() { damegeTextManager = GameObject.FindGameObjectWithTag("DamageText").GetComponent <DamageTextManager>(); smallFood_Setting = GameObject.FindGameObjectWithTag("SmallMenu_Setting").GetComponent <SmallFood_Setting>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); mainFood_Setting = GameObject.FindGameObjectWithTag("MainFood_Setting").GetComponent <MainFood_Setting>(); combo_system = GameObject.FindGameObjectWithTag("Combo_System").GetComponent <Combo_System>(); stage = GameObject.FindGameObjectWithTag("Stage").GetComponent <StageManager>(); layerMask = LayerMask.GetMask(DishLayer, SkillLayer); startSmallFoodAnimation = GameObject.FindGameObjectWithTag("StartSmallFoodPosition").GetComponent <StartSmallFoodAnimation>(); mainSpoonAnimation = GameObject.FindGameObjectWithTag("MainSpoon").GetComponent <MainSpoonAnimation>(); mainChopsticAnimation = GameObject.FindGameObjectWithTag("MainChopstic").GetComponent <MainChopsticAnimation>(); SmallSpoonAnimation = GameObject.FindGameObjectWithTag("SmallSpoonAnimation").GetComponent <SmallSpoonAnimation>(); mainForksAnimation = GameObject.FindGameObjectWithTag("MainForks").GetComponent <MainForksAnimation>(); mainKnifeAnimation = GameObject.FindGameObjectWithTag("MainKnife").GetComponent <MainKnifeAnimation>(); blueDishGather = GameObject.FindGameObjectWithTag("Blue_Dish_Gather").GetComponent <BlueDishGather>(); yellowDishGather = GameObject.FindGameObjectWithTag("Yellow_Dish_Gather").GetComponent <YellowDishGather>(); greenDishGather = GameObject.FindGameObjectWithTag("Green_Dish_Gather").GetComponent <GreenDishGather>(); redDishGather = GameObject.FindGameObjectWithTag("Red_Dish_Gather").GetComponent <RedDishGather>(); playerAnimation = GameObject.FindGameObjectWithTag("PlayerRender").GetComponent <PlayerAnimation>(); smallChopsticAnimation = GameObject.FindGameObjectWithTag("SmallChopstic").GetComponent <SmallChopsticAnimation>(); smallForksAnimation = GameObject.FindGameObjectWithTag("SmallForks").GetComponent <SmallForksAnimation>(); smallKnifeAnimation = GameObject.FindGameObjectWithTag("SmallKnife").GetComponent <SmallKnifeAnimation>(); mainCamara = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MainCamara>(); stt = GameObject.FindGameObjectWithTag("STI").GetComponent <SustainmentTime>(); }
void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Ctrl_PC>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); mainFood_Setting = GameObject.FindGameObjectWithTag("MainFood_Setting").GetComponent <MainFood_Setting>(); if (player.mainStage == false) { text.text = CountModule(smallStageMenu_Setting.GetComponentInChildren <SmallStageMenu>().damage); } else { text.text = CountModule(mainFood_Setting.GetComponentInChildren <MainFood>().damage); } animationNumber = Random.Range(1, 3); if (animationNumber == 1) { this.GetComponent <Animator>().Rebind(); this.GetComponent <Animator>().Play("Attack1"); } if (animationNumber == 2) { this.GetComponent <Animator>().Rebind(); this.GetComponent <Animator>().Play("Attack2"); } Destroy(this.gameObject, 0.7f); }
void Start() { smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); mainFood_Setting = GameObject.FindGameObjectWithTag("MainFood_Setting").GetComponent <MainFood_Setting>(); randomMax = mainStageImage.Length; if (mainStageCount == 1) { randomStage = Random.Range(1, randomMax); mainStageSlot2.gameObject.GetComponent <Image>().sprite = mainStageImage[randomStage]; randomStage = Random.Range(1, randomMax); mainStageSlot3.gameObject.GetComponent <Image>().sprite = mainStageImage[randomStage]; mainStageText2.text = mainStageCount.ToString(); mainStageText3.text = (mainStageCount + 1).ToString(); } else { randomStage = Random.Range(1, randomMax); mainStageSlot1.gameObject.GetComponent <Image>().sprite = mainStageImage[randomStage]; randomStage = Random.Range(1, randomMax); mainStageSlot2.gameObject.GetComponent <Image>().sprite = mainStageImage[randomStage]; randomStage = Random.Range(1, randomMax); mainStageSlot3.gameObject.GetComponent <Image>().sprite = mainStageImage[randomStage]; mainStageText1.text = (mainStageCount - 1).ToString(); mainStageText2.text = mainStageCount.ToString(); mainStageText3.text = (mainStageCount + 1).ToString(); } smallstageText.text = smallstageCount.ToString() + " / 10"; }
int stageindex = 0; // 해당스테이지의 메뉴값(1~10스테이지의 메뉴 , 11~20스테이지의 메뉴) // Use this for initialization void Start() { mainFood_Collection = GameObject.FindGameObjectWithTag("MainFood_Collection").GetComponent <MainFood_Collection>(); player_Ctrl_PC = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Ctrl_PC>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); foodrandomIndexMax = mainFood_Collection.mainFood_Collection.Length; //Debug.Log("랜덤인덱스 = " + mainFood_Collection.mainFood_Collection.Length); //StartMainMenuSetting(); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Ctrl_PC>(); mainFood_Setting = GameObject.FindGameObjectWithTag("MainFood_Setting").GetComponent <MainFood_Setting>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); stageManager = GameObject.FindGameObjectWithTag("Stage").GetComponent <StageManager>(); damageText = GameObject.FindGameObjectWithTag("DamageText").GetComponent <DamageTextManager>(); maxHP = stageManager.mainStageHp; currentHp = stageManager.mainStageHp; }
void Start() { if (img == null) { img = gameObject.GetComponent <Image>(); } if (btn == null) { btn = gameObject.GetComponent <UnityEngine.UI.Button>(); } pc = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Ctrl_PC>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); }
void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Ctrl_PC>(); smallStageMenu_Setting = GameObject.FindGameObjectWithTag("SmallStageMenu_Setting").GetComponent <SmallStageMenu_Setting>(); mainFood_Setting = GameObject.FindGameObjectWithTag("MainFood_Setting").GetComponent <MainFood_Setting>(); }