コード例 #1
0
    void Start()
    {
        sound = GetComponent <AudioSource>();
        cam   = Camera.main.GetComponent <CameraMovement>();

        idle   = ScriptableObject.CreateInstance <Idle>();
        walk   = ScriptableObject.CreateInstance <Walk>();
        hit    = ScriptableObject.CreateInstance <Hit>();
        shield = ScriptableObject.CreateInstance <Shield>();
        jump   = ScriptableObject.CreateInstance <Jump>();
        push   = ScriptableObject.CreateInstance <Push>();

        idle.GrabComponents(this);
        walk.GrabComponents(this);
        hit.GrabComponents(this);
        shield.GrabComponents(this);
        jump.GrabComponents(this);

        push.GrabComponents(this);

        currentState = idle;
        room         = new Vector2Int(0, 0);

        keys = 0;

        easterEggInput = "";
    }