new void Awake()
    {
        base.Awake();
        //取得
        _attack        = GetComponent <AunnAttack>();
        _effect        = GetComponentInChildren <AunnEffect>();
        _rigid         = GetComponent <Rigidbody2D>();
        _collider      = GetComponent <CapsuleCollider2D>();
        _anim          = GetComponent <Animator>();
        melody_Manager = GetComponentInChildren <MelodyManager>();

        default_Gravity = _rigid.gravityScale;
    }
Example #2
0
 void Start()
 {
     //取得
     _attack        = GetComponent <SatoMaiAttack>();
     _anim          = GetComponent <Animator>();
     melody_Manager = GetComponentInChildren <MelodyManager>();
     //戦闘前ムービー開始
     if (SceneManagement.Instance.Is_First_Visit())
     {
         before_Movie.Start_Movie();
     }
     else
     {
         before_Movie_Skip.Start_Movie();
     }
 }
    public override void OnInspectorGUI()
    {
        MelodyManager obj = target as MelodyManager;

        for (int i = 0; i < obj.melody_List.Count; i++)
        {
            obj.melody_List[i].melody = (MelodyManager.Melody)EditorGUILayout.EnumPopup("Melody", obj.melody_List[i].melody);
            obj.melody_List[i].span   = EditorGUILayout.Vector2Field("Span[s]", obj.melody_List[i].span);

            if (i > 0)
            {
                obj.melody_List[i].span = new Vector2(obj.melody_List[i - 1].span.y, obj.melody_List[i].span.y);
            }
            if (obj.melody_List[i].span.x > obj.melody_List[i].span.y)
            {
                obj.melody_List[i].span = new Vector2(1, 1) * obj.melody_List[i].span.x;
            }

            EditorGUILayout.Space();
        }

        //メロディー追加
        EditorGUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        if (GUILayout.Button("Add", GUILayout.Width(200), GUILayout.Height(20)))
        {
            obj.Add_Melody();
        }
        if (GUILayout.Button("Remove", GUILayout.Width(200), GUILayout.Height(20)))
        {
            obj.Remove_Melody();
        }

        GUILayout.FlexibleSpace();
        EditorGUILayout.EndHorizontal();
    }