// Use this for initialization void Awake() { cam = Camera.main; playerAttack = GetComponent <PlayerAttack_Level3>(); playerMove = GetComponent <PlayerMove_Level3>(); audioSources = GetComponents <AudioSource>(); audioSource = audioSources[2]; }
void Start() { anim = GetComponent <Animator>(); nextPosition = new Vector2(transform.position.x, transform.position.y - 1); nextDir = FaceDirection.Down; audioSources = GetComponents <AudioSource>(); audioSource = audioSources[1]; playerStatus = GetComponent <PlayerStatus_Level3>(); playerAttack = GetComponent <PlayerAttack_Level3>(); }
// 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>(); } }