// Use this for initialization void Start() { timer = transform.GetComponent <UnitCoolTimer>(); //일단 SphereCollider로 한다. try { transform.GetComponent <BoxCollider>().isTrigger = true; } catch (UnityEngine.MissingComponentException) { Debug.Log("NullError"); gameObject.AddComponent <BoxCollider>(); transform.GetComponent <BoxCollider>().isTrigger = true; } }
// Use this for initialization void Start() { //transform.GetComponent<AudioSource>().Stop(); try { attackDIR[0].enabled = true; attackDIR[1].enabled = false; attackDIR[2].enabled = false; } catch (System.Exception) { } //플레이어가 투사체를 발사할 위치를 앞부분으로 우선 설정한다. index_OF_playerAttackerTransforms = 0; playerAttacker = playerAttackerTransforms[index_OF_playerAttackerTransforms]; //해당 스크립트와 CombatEngine에서 모두 사용하기 위해 이렇게 초기화하여 전달한다. __PLY_CoolTimer = transform.GetComponent <UnitCoolTimer>(); }