// Start is called before the first frame update void Start() { Network_Login network = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); player = network.PlayerName; target = GameObject.Find(player).transform; }
// Start is called before the first frame update void Start() { button = GetComponent <Button>(); itemInfo = new ItemInfo(); network = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); button.onClick.AddListener(useItem); }
private void getLogin() { loginInfo.message = "loginRequest"; loginInfo.id = Id.text; loginInfo.password = Password.text; Network_Login manager = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); manager.SendPacket2Server(loginInfo); }
void Start() { button = gameObject.GetComponent <Button>(); button.onClick.AddListener(InviteToParty); PartyPacket = new Party(); slider = GameObject.Find("HPBar").GetComponent <Slider>(); NetworkManager = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); // if(NetworkManager.isInParty && !NetworkManager.isLeader){ // transform.SetActive(false); // } }
// Start is called before the first frame update void Start() { charaPos.nickname = GameObject.Find("NetworkManager").GetComponent <Network_Login>().PlayerName.ToString(); charaPos.message = "PlayerMove"; charaPos.x = transform.position.x; charaPos.y = transform.position.y; charaPos.z = transform.position.z; charaPos.angle_x = transform.eulerAngles.x; //charaPos.angle_y = transform.rotation.y; charaPos.angle_y = transform.eulerAngles.y; charaPos.angle_z = transform.eulerAngles.z; NetworkManager = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); targeting = GetComponent <targeting>(); StartCoroutine(CheckMove()); }
void Start() { myAni = GetComponent <EnemyAni>(); ChangeState(State.Idle, EnemyAni.IDLE); network = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); string playerName = network.PlayerName; playerController = GameObject.Find(playerName).GetComponent <PlayerController>(); StateA = (int)playerController.PlayerStateAttack; enemyInfo = new EnemyInfo(); //enemyInfo.hp = 3; enemyInfo.x = transform.position.x; enemyInfo.z = transform.position.z; enemyInfo.angle_y = transform.eulerAngles.y; enemyInfo.message = "EnemyAction"; hitEffect = GameObject.Find("Spark").GetComponent <ParticleSystem>(); hitEffect.Stop(); }
void Start() { network = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); for (int i = 0; i < network.items.Count; i++) { //1. 해당 name에 해당하는 이미지 찾기 //2. 해당이미지를 image컴포넌트에 등록시키기 //transform.GetChild(i). if (network.items[i].item_name == "hp_potion") { //transform.GetChild(0).transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).transform.GetChild(i).transform.GetChild(0).GetComponent<RawImage>().Texture = hp_potion; Transform target = transform.GetChild(0).transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).transform.GetChild(i); target.name = "hp_potion"; target.GetChild(0).GetComponent <RawImage>().texture = hp_potion; target.GetChild(1).gameObject.SetActive(true); target.GetChild(1).GetComponent <TextMeshProUGUI>().text = network.items[i].count.ToString(); } } transform.FindChild("InvenPanel").gameObject.SetActive(false); }
// Start is called before the first frame update void Start() { chatText = GameObject.Find("Chat").GetComponent <Text>(); scroll_rect = GameObject.Find("Scroll View").GetComponent <ScrollRect>(); network = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); }
// Start is called before the first frame update void Start() { button = GetComponent <Button>(); networkManager = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); button.onClick.AddListener(ArriveParty); }
// Start is called before the first frame update void Start() { networkManager = GameObject.Find("NetworkManager").GetComponent <Network_Login>(); }