void Start() { try { status = FindObjectOfType <PlayerManager>().Status; player_ctr = GameObject.Find("Controller").GetComponent <PlayerController>(); move_ctr = GameObject.FindObjectOfType <MoveController>(); crossAxisdown = move_ctr.gameObject.GetComponent <CrossAxisDown>(); alchemy_ctr = GameObject.FindObjectOfType <AlchemyController>(); alchemyText = gameObject.GetComponent <AlchemyText>(); ChooseObj = gameObject.transform.Find("ThrowChoose").gameObject; ChooseObj.SetActive(false); ItemFrame = gameObject.transform.Find("SelectFrame").gameObject; PotFrame = gameObject.transform.Find("AlchemyPotFrame").gameObject; mtr_0 = PotFrame.transform.Find("AlchemyPotin/Material/material_0").gameObject.transform.GetChild(0).gameObject; mtr_1 = PotFrame.transform.Find("AlchemyPotin/Material/material_1").gameObject.transform.GetChild(0).gameObject; AlphaSprite = Resources.Load <Sprite>("Textures/UI/AlphaImage"); SuccessPanel = gameObject.transform.Find("Alchemy_Succes").gameObject; } catch (Exception e) { Debug.LogWarning(e + "がないよ!"); } nowAlchemyItem = 0; nowBox = 0; beforeNowBox = -1; _chooseWindow = false; setItembox(); setItemImageList(); StartCreateItemBox(); Box_item = new GameObject[Itembox.Length]; ClearJoystickRotation(); Materials_item.Clear(); }
// Use this for initialization void Start() { direc = Direction.LEFT; pManager = GameObject.Find("PlayerStatus").GetComponent <PlayerManager>(); PotObject = FindObjectOfType <PotController>().gameObject; rig = gameObject.transform.parent.GetComponent <Rigidbody2D>(); player_ctr = GameObject.Find("Controller").GetComponent <PlayerController>(); bringctr = gameObject.transform.parent.GetChild(0).GetComponent <BringCollider>(); alchemyUI_ctr = GameObject.Find("Canvas/Alchemy_UI").GetComponent <AlchemyUIController>(); miniMap_ctr = GameObject.Find("Canvas/MiniMap").GetComponent <MiniMapController>(); anim_ctr = gameObject.transform.parent.GetComponent <AnimController>(); leg_col = gameObject.transform.parent.GetComponentInChildren <LegCollider>(); crossAxisDown = gameObject.GetComponent <CrossAxisDown>(); }