/* * void CheckGameStart() * { * if(gameStart) * { * if(first) * { * audioSource.Play(); * first = false; * } * if(remainSeconds > 0f) * { * remainSeconds -= Time.deltaTime; * if(remainSeconds > 2f) * { * text.text = "3!!!"; * }else if(remainSeconds > 1f) * { * text.text = "2!!!"; * }else * { * text.text = "1!!!"; * } * } * else * { * text.text = "Game Start!"; * player1Move.enabled = true; * player2Move.enabled = true; * onGame = true; * durationSeconds = 2f; * } * } * } */ void Awake() { _instance = this; playerIdentity = PlayerStatusControl_All._instance.playerIndex + 1; player1Move = player1.GetComponent <PlayerMove_Level3>(); player2Move = player2.GetComponent <PlayerMove_Level3>(); player3Move = player3.GetComponent <PlayerMove_Level3>(); player1Status = player1.GetComponent <PlayerStatus_Level3>(); player2Status = player2.GetComponent <PlayerStatus_Level3>(); player3Status = player3.GetComponent <PlayerStatus_Level3>(); mc = GetComponent <MapController>(); win_lose_black.enabled = false; player1Move.enabled = false; player2Move.enabled = false; player3Move.enabled = false; remainSeconds = 3f; durationSeconds = 0; audioSource = GetComponent <AudioSource>(); win_lose_black.enabled = false; //tcpClient = GetComponent<TcpClient_Level3>(); playerReady = new bool[3]; for (int i = 0; i < 3; i++) { playerReady[i] = false; } }
// Use this for initialization void Awake() { cam = Camera.main; playerAttack = GetComponent <PlayerAttack_Level3>(); playerMove = GetComponent <PlayerMove_Level3>(); audioSources = GetComponents <AudioSource>(); audioSource = audioSources[2]; }
// Use this for initialization void Awake() { _instance = this; cam = Camera.main; attack = GetComponent <PlayerAttack_Level3>(); move = GetComponent <PlayerMove_Level3>(); audioSources = GetComponents <AudioSource>(); audioSource = audioSources[2]; damageReflectText.enabled = false; attackBuffText.enabled = false; overPoisonText.enabled = false; overAreaText.enabled = false; }
void Start() { _instance = this; player1 = GameObject.FindWithTag("Player1"); player2 = GameObject.FindWithTag("Player2"); player3 = GameObject.FindWithTag("Player3"); pm1 = player1.GetComponent <PlayerMove_Level3>(); pm2 = player2.GetComponent <PlayerMove_Level3>(); pm3 = player3.GetComponent <PlayerMove_Level3>(); pa1 = player1.GetComponent <PlayerAttack_Level3>(); pa2 = player2.GetComponent <PlayerAttack_Level3>(); pa3 = player3.GetComponent <PlayerAttack_Level3>(); ps1 = player1.GetComponent <PlayerStatus_Level3>(); ps2 = player2.GetComponent <PlayerStatus_Level3>(); ps3 = player3.GetComponent <PlayerStatus_Level3>(); InitSocket(); }
void Update() { player1 = GameObject.FindWithTag("Player1"); player2 = GameObject.FindWithTag("Player2"); player3 = GameObject.FindWithTag("Player3"); if (player1) { pm1 = player1.GetComponent <PlayerMove_Level3>(); pa1 = player1.GetComponent <PlayerAttack_Level3>(); ps1 = player1.GetComponent <PlayerStatus_Level3>(); } if (player2) { pm2 = player2.GetComponent <PlayerMove_Level3>(); pa2 = player2.GetComponent <PlayerAttack_Level3>(); ps2 = player2.GetComponent <PlayerStatus_Level3>(); } if (player3) { pm3 = player3.GetComponent <PlayerMove_Level3>(); pa3 = player3.GetComponent <PlayerAttack_Level3>(); ps3 = player3.GetComponent <PlayerStatus_Level3>(); } }
// Use this for initialization void Start() { move = this.GetComponent <PlayerMove_Level3>(); }
// Use this for initialization void Start() { pm = player.GetComponent <PlayerMove_Level3>(); anim = player.GetComponent <Animator>(); }