void Start() { remotePlayer = GameObject.FindWithTag("RemotePlayer").transform; myParams = GetComponent <RemoteParams>(); myAni = GetComponent <RemoteAni>(); myParams.InitParams(); myParams.deadEvent.AddListener(RemoteChangeToPlayerDead); player = GameObject.FindWithTag("Player").transform; playerParams = GameObject.FindWithTag("Player").GetComponent <PlayerParams>(); playerAni = GameObject.FindWithTag("Player").GetComponent <PlayerAni>(); monster = GameObject.Find("Spider").transform; redTowerPos = GameObject.FindWithTag("RedTower").transform; curEnemyParams = GameObject.Find("Monster").GetComponent <MonsterParams>(); towerParams = GameObject.FindWithTag("RedTower").GetComponent <TowerParams>(); network = GameObject.Find("NetworkManager").GetComponent <Network>(); Debug.Log("리모트 FSM Start "); skillBtn = GameObject.Find("TaiLungSpell1").GetComponent <SkillButton>(); }
void Start() { skillButton = GameObject.Find("TaiLungSpell1").GetComponent <SkillButton>(); Player = GameObject.FindWithTag("Player").GetComponent <Transform>(); anim = GameObject.FindWithTag("Player").GetComponent <Animator>(); player2 = GameObject.FindWithTag("RemotePlayer").GetComponent <Transform>(); playerFsm2 = GameObject.FindWithTag("Player").GetComponent <PlayerFSM2>(); attack = GameObject.Find("AttackButton").GetComponent <AttakButton>(); myAni = GameObject.FindWithTag("Player").GetComponent <PlayerAni>(); characterCreate = new CharacterCreate(); gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); //Player = GameObject.Find(myid).GetComponent<Transform>(); Debug.Log("JoyStick Scripts myid value: " + myid); // Player = GameObject.FindWithTag("Player").GetComponent<Transform>(); //EventTrigger eventTrigger = new EventTrigger(); Radius = GetComponent <RectTransform>().sizeDelta.y * 0.5f; StickFirstPos = Stick.transform.position; // 캔버스 크기에대한 반지름 조절. float Can = transform.parent.GetComponent <RectTransform>().localScale.x; Radius *= Can; MoveFlag = false; network = GameObject.Find("NetworkManager").GetComponent <Network>(); myid = network.myId; Debug.Log("네트워크 스크립트 내 아이디 : " + network.myId); remoteAni = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteAni>(); }
// 초기화 void Start() { playerCharacter = GameObject.FindWithTag("Player"); player = GameObject.FindWithTag("Player").transform; myParams = GetComponent <PlayerParams>(); myAni = GetComponent <PlayerAni>(); myParams.InitParams(); myParams.deadEvent.AddListener(ChangeToPlayerDead); remotePlayer = GameObject.FindWithTag("RemotePlayer").transform; remoteParams = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteParams>(); remoteAni = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteAni>(); remoteFSM = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteFSM>(); monster = GameObject.Find("Spider").transform; skillButton = GameObject.Find("TaiLungSpell1").GetComponent <SkillButton>(); curEnemyParams = GameObject.Find("Monster").GetComponent <MonsterParams>(); basicAttack = GameObject.Find("AttackButton").GetComponent <AttakButton>(); redTowerPos = GameObject.FindWithTag("RedTower").transform; towerParams = GameObject.FindWithTag("RedTower").GetComponent <TowerParams>(); network = GameObject.Find("NetworkManager").GetComponent <Network>(); joy = GameObject.Find("JoystickBackGround").GetComponent <JoyStick>(); }
// Use this for initialization void Start() { network = GameObject.Find("NetworkManager").GetComponent <Network>(); myCharacterName = PlayerPrefs.GetString("myCharacter"); joy = GameObject.Find("JoystickBackGround").GetComponent <JoyStick>(); playerParams = GameObject.FindWithTag("Player").GetComponent <PlayerParams>(); playerFSM2 = GameObject.FindWithTag("Player").GetComponent <PlayerFSM2>(); remoteParams = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteParams>(); remoteFSM = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteFSM>(); remoteAni = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteAni>(); characterCreate = GetComponent <CharacterCreate>(); //greenRespawnTaiLung = GameObject.Find("GreenRespawnTaiLung").GetComponent<GameObject>(); //redRespawnTiaLung = GameObject.Find("RedRespawnTaiLung").GetComponent<GameObject>(); //greenRespawnCoundDown = GameObject.Find("GreenRespawnCoundDown").GetComponent<Text>(); //redRespawnCoundDown = GameObject.Find("RedRespawnCoundDown").GetComponent<Text>(); myBase = characterCreate.myTeam; countDown = 10f; respawnTimer = 0f; }
//public static void Main(string[] args) //{ public void Start() { //androidPlugin = GameObject.Find("NetworkManager").GetComponent<AndroidPlugin>(); Debug.Log("네트워크 스크립트"); //joy = GameObject.Find("JoystickBackGround").GetComponent<JoyStick>(); Debug.Log("네트워크 스크립트2"); singleton = this; player = GameObject.FindWithTag("Player").GetComponent <Transform>(); playerAni = GameObject.FindWithTag("Player").GetComponent <PlayerAni>(); player2 = GameObject.FindWithTag("RemotePlayer").GetComponent <Transform>(); remoteAni = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteAni>(); //rigidboby = GameObject.FindWithTag("RemotePlayer").GetComponent<Rigidbody>(); //myId = androidPlugin.text; //myId = "Nova"; //myTeam = "1"; //myId = "Nova"; //Debug.Log("내 아이디: "+ myId); //Connected(); //Send(myId + "," + "myTeamCall"); //ConnectToTcpServer(); //clientSocket.Close(); //myId = PlayerPrefs.GetString("myId"); exampleClass = GameObject.Find("IDManager").GetComponent <ExampleClass>(); myId = exampleClass.myId; Debug.Log("Unity Network Script myId: " + myId); //Connected(); //Send(myId); //ConnectToTcpServer(); playerFsm = GameObject.FindWithTag("RemotePlayer").GetComponent <PlayerFSM>(); playerFsm2 = GameObject.FindWithTag("Player").GetComponent <PlayerFSM2>(); remoteFSM = GameObject.FindWithTag("RemotePlayer").GetComponent <RemoteFSM>(); monsterFSM = GameObject.Find("Spider").GetComponent <MonsterFSM>(); Connected(); Send(myId); ConnectToTcpServer(); skillOne = GameObject.Find("TaiLungSpell1").GetComponent <SkillButton>(); //StartCoroutine(PlayerSet()); }