void Start() { powerRedCrossToDelete = new GameObject[50]; audioSources = GetComponents <AudioSource>(); audioSource = audioSources[0]; tcpClient = networkManager.GetComponent <TcpClient_Level2>(); }
void Start() { anim = GetComponent <Animator>(); tcpClient = networkManager.GetComponent <TcpClient_Level2>(); audioSources = GetComponents <AudioSource>(); audioSource = audioSources[0]; firePosition = transform.position; }
void Start() { _instance = this; em1 = player1.GetComponent <PlayerMove_Level2>(); em2 = player2.GetComponent <PlayerMove_Level2>(); pa1 = player1.GetComponent <PlayerAttack_Level2>(); pa2 = player2.GetComponent <PlayerAttack_Level2>(); InitSocket(); }
void Start() { anim = GetComponent <Animator>(); //camAnimator = cam.GetComponent<Animator>(); tcpClient = networkManager.GetComponent <TcpClient_Level2>(); nextPosition = new Vector2(transform.position.x, transform.position.y - 1); nextDir = FaceDirection.Down; audioSources = GetComponents <AudioSource>(); audioSource = audioSources[1]; }
/* * 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; player1Move = player1.GetComponent <PlayerMove_Level2>(); player2Move = player2.GetComponent <PlayerMove_Level2>(); player1Move.enabled = false; player2Move.enabled = false; remainSeconds = 3f; durationSeconds = 0; text.text = "Wait for another player"; audioSource = GetComponent <AudioSource>(); win_lose_Image.enabled = false; win_lose_black.enabled = false; tcpClient = GetComponent <TcpClient_Level2>(); }
void Start() { tcpClient = TcpClient_Level2._instance; }