コード例 #1
0
    /// <summary>
    /// Initializes a new instance of the <see cref="StorageContainer"/> class.
    /// </summary>
    public StorageContainer()
    {
        // Player Info
        GameObject player      = GameObject.FindGameObjectWithTag("Player");
        Transform  playerTrans = player.transform;
        Vector3    p_pos       = playerTrans.position;
        Quaternion p_rot       = playerTrans.rotation;
        Vector3    p_scale     = playerTrans.localScale;

        // Level Info
        string sceneName = SceneManager.GetActiveScene().name;

        PlayerPos   = new float[] { p_pos.x, p_pos.y, p_pos.z };
        PlayerRot   = new float[] { p_rot.x, p_rot.y, p_rot.z, p_rot.w };
        PlayerScale = new float[] { p_scale.x, p_scale.y, p_scale.z };

        SceneName = sceneName;

        objList = ObjectiveManager.GetList();
    }