public void Initialize(SceneController sceneController, AudioSource bgm, SongData.Note note, float positionX)
        {
            gameObject.SetActive(true);

            this.sceneController = sceneController;
            this.bgm             = bgm;
            this.note            = note;
            this.positionX       = positionX;
            switch (note.NoteNumber)
            {
            case 1:
            /* case 3:
             *   image.color = Color.green;
             *   break;*/
            default:
                image.color = Color.white;
                break;
            }

            Update();
        }
Exemple #2
0
    public void Initialize(PlayController playController, AudioSource bgm, SongData.Note note)
    {
        Transform trans = this.transform;
        Vector3   pos   = trans.position;

        pos.x          = note.Postition.x;
        pos.y          = note.Postition.y;
        trans.position = pos;
        trans.rotation = Quaternion.Euler(note.Rotation);


        gameObject.SetActive(true);

        this.playController = playController;
        this.bgm            = bgm;
        this.note           = note;


        GetComponent <Renderer>().material.mainTexture = this.noteTextures[note.NoteNumber];

        Update();
    }