示例#1
0
    // Start is called before the first frame update
    protected virtual void Start()
    {
        metronome = GameObject.FindGameObjectWithTag("Metronome").GetComponent <Metronome>();
        metronome.AddObserver(this);
        audioSource = GetComponent <AudioSource>();
        animator    = GetComponentInChildren <Animator>();

        //Vector3 atkIndicatorPosition = transform.position;
        //atkIndicatorPosition.z -= 2f;
        //GameObject atkIndicator = Instantiate(atkIndicatorPrefab,atkIndicatorPosition,Quaternion.Euler(-90f,0f,0f),transform);
        //atkIndicator.GetComponent<TextMesh>().text = attackPower + "";
    }